Re: copy and paste between X11 and native apps
Re: copy and paste between X11 and native apps
- Subject: Re: copy and paste between X11 and native apps
- From: Young Hyun <email@hidden>
- Date: Mon, 11 Oct 2004 10:51:25 -0700 (PDT)
Thanks, John, for this pointer. Here are some things that make your idea
even more useful for xemacs users. According to menubar-items.el, the
function executed for Edit->Copy is copy-primary-selection, which doesn't
appear to be bound to any key. It can be bound to M-c with the following:
(global-set-key [(meta c)] 'copy-primary-selection)
M-c is currently bound to capitalize-region-or-word (on my xemacs), which
I won't miss. It's too bad that M-x and M-v are already bound to
indispensable functions, or else, I would have re-bound them to cut
(kill-primary-region) and paste (yank-clipboard-selection). One caveat
with global-set-key, though. I believe any global keybinding can be
overridden by a local keybinding, so M-c may not necessarily stay bound to
copy-primary-selection everywhere.
I also came across an intriguing variable: selection-sets-clipboard.
The documentation says
When non-nil, any operation that sets the primary selection will
also set the clipboard.
So presumably, I can add the following to my .xemacs/init.el and dispense
with executing copy-primary-selection after highlighting some text:
(setq-default selection-sets-clipboard t)
If so, this is exactly what I was looking for. I'll need to test it to
see how well it works, but it sounds promising.
--Young
On Fri, 8 Oct 2004, John Davidorff Pell wrote:
> Since you use emacs, I assume that you know how to use emacs' own
> copy-and-paste functionality (which uses the X clipboard when in X).
> Anything that goes into the *real* X clipboard (not the X selection) is
> *immediately* mirrored in the Aqua clipboard, and vise-versa. Until I
> figured this out, it used to make me crazy because there was a delay
> between copy (from X) and paste (to aqua).
>
> In XEmacs, click the copy button in the tool bar (I forget the
> key-combo) and try pasting into Terminal.app, I'll bet that it will
> work flawlessly every time. The X selection-to-aqua-clipboard-on-CMD+C
> is something that I still have trouble with, because I'm used to -C,
> but in any X app that uses the X clipboard (all good ones do) you just
> have to learn the shortcut to copy-to-X-clipboard and you're good to
> go.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden