Cutting and pasting in emacs [Was: X11 Updates]
Cutting and pasting in emacs [Was: X11 Updates]
- Subject: Cutting and pasting in emacs [Was: X11 Updates]
- From: P T Withington <email@hidden>
- Date: Fri, 26 Mar 2004 07:05:32 -0500
Date: Thu, 25 Mar 2004 22:40:13 +0000 (GMT)
From: Michael Abbott <email@hidden>
On Thu, 25 Mar 2004, Chris Palma wrote:
4. Cut and paste out of X11 is a mess. As for trying to cut and
paste
when emacs is in the picture, oh dear.
6. The Applications Customize editor is a joke. (Can anyone tell me
what
the "shortcut" entry does?)
Anyway, just to address the 2 points above, I've found that cut &
paste
work ok, if not perfectly. If you copy from any Aqua application,
then
use the middle mouse button in X, it pastes.
Yes, I find this direction works every time, which is good. Except
when
(x)emacs is involved, but I know that emacs cut/paste handling is
fundamentally evil.
I made the following change to x-cut-buffer-or-selection-value to make
c-Y from the Apple clipboard work in emacs:
*** /tmp/ediff484P9m Fri Mar 26 06:55:32 2004
--- /tmp/ediff484cHt Fri Mar 26 06:55:32 2004
***************
*** 22,30 ****
--- 22,44 ----
(error nil)))
(if (string= text "") (setq text nil))
+ ; Filter out either of those it they are from us
+ (setq text
+ (cond
+ ((not text) nil)
+ ((eq text x-last-selected-text) nil)
+ ((string= text x-last-selected-text)
+ ;; Record the newer string, so subsequent calls can use
the `eq' test.
+ (setq x-last-selected-text text)
+ nil)
+ (t
+ text)))
+
+ ; Try the cut buffer
(or text (setq text (x-get-cut-buffer 0)))
(if (string= text "") (setq text nil))
+ ; Now filter once again
(cond
((not text) nil)
((eq text x-last-selected-text) nil)
I would love to know if anyone else thinks that is useful.
If you use Apple-C for copy in an X app, then use Apple-V to paste
into
any aqua app, it works for me if I hit Apple-V twice. So, not
perfect,
but ok.
This direction not so good. Typically in my experience I have, the
first
time I have selected a region and copied it, about five seconds to
paste
before the selection is cancelled. However, the second time I seem to
get
more leeway. Tends to depend where I click before trying to paste.
I find what works for me in emacs is to use m-W to copy to the X
clipboard and then Apple-C to copy to the Apple clipboard.
[...]
Hmm. Except, because I have to disable "key equivalents" so I can use
emacs, Command-N actually doesn't do anything at all now. Seems to
depend
where the focus is.
I swap alt and meta, use meta for emacs, which leaves Command- free for
key equivalents.
[Disclaimer: I only use X for emacs and xterm]
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
Do not post admin requests to the list. They will be ignored.