Article View: gnu.epoch.misc
Article #1293Re: cut-and-paste in epoch
From: Jan Rekers
Date: Wed, 01 Jul 1992 12:57
Date: Wed, 01 Jul 1992 12:57
33 lines
1900 bytes
1900 bytes
In article <1992Jun30.220838.26563@cbfsb.cb.att.com>, swu@att.com (Chi-Sharn Wu) writes:
|> Is there anyway to let the cursor automatically point to the end of where
|> I just paste ? Just like in xterm, moving the curosr to the end of pasted
|> place with pressing mouse-left-button.
I posted a request for the same thing and I received the following peice of code
from a kind soul. Put it in your .emacs file, or load it from your .emacs
file.
(defun paste-cut-buffer (arg)
"Retrieve text from appropriate selection, or X cut-buffer if none"
(let ((buff (nth 1 arg)))
(when (and buff (bufferp buff))
(mouse::set-point arg)
(undo-boundary)
(goto-char (car arg))
;; get text from selection PRIMARY
;; insert text once it's there.
(let ((text
(epoch::convert-selection mouse::selection-atom
"STRING" "PROPERTY")))
;; Make sure string isn't ""
(if (and (stringp text) (> (length text) 0))
;; selection is owned and has a value
(insert text)
;; grab cut-buffer instead
(insert (get-cut-buffer)))))))
(global-set-mouse mouse-middle mouse-down 'paste-cut-buffer)
--
Jan Rekers (Jan.Rekers@cwi.nl) Centrum voor Wiskunde en Informatica (CWI)
P.O. Box 4079, 1009 AB Amsterdam, The Netherlands
Technical Details
Message-ID:
<6517@charon.cwi.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!cwi.nl!rekersReferences:
<1992Jun30.220838.26563@cbfsb.cb.att.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc7ee,1331f4eb1f741446 X-Google-Attributes: gidfc7ee,public X-Google-ArrivalTime: 1992-07-01 00:56:48 PST Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!cwi.nl!rekers From: rekers@cwi.nl (Jan Rekers) Newsgroups: gnu.epoch.misc Subject: Re: cut-and-paste in epoch Message-ID: <6517@charon.cwi.nl> Date: 1 Jul 92 12:57:47 GMT References: <1992Jun30.220838.26563@cbfsb.cb.att.com> Sender: news@cwi.nl Organization: CWI, Amsterdam Lines: 33