🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Chi-Sharn Wu Tue, 30 Jun 1992 22:08
cut-and-paste in epoch
#1290
Author: Chi-Sharn Wu
Date: Tue, 30 Jun 1992 22:08
10 lines
874 bytes
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.
Thanks.

---

Chi-Sharn Wu
swu@probe.att.com
Re: cut-and-paste in epoch
#1293
Author: Jan Rekers
Date: Wed, 01 Jul 1992 12:57
33 lines
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
Re: cut-and-paste in epoch
#1294
Author: Warner Losh
Date: Wed, 01 Jul 1992 18:24
26 lines
1562 bytes
In article <6517@charon.cwi.nl> rekers@cwi.nl (Jan Rekers) writes:
>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.
[...]
>      (mouse::set-point arg)
[...]
>      (goto-char (car arg))
[...]

If you don't want the cursor to move, like xterm, then remove these
two lines.  This appears to do the trick for me.  It causes the
function posted to paste into the buffer you clicked on at the point
rather than the location of the click, and leave the cursor at the
end.

Warner
-- 
Warner Losh		imp@Solbourne.COM
"I think we'd get fewer weird bug reports if we stopped selling our
 software off planet."  sm at shorty's
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads