help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help with emacs clipboard.


From: cplum984
Subject: Need help with emacs clipboard.
Date: Mon, 12 Jan 2015 18:47:01 -0800 (PST)
User-agent: G2/1.0

I've switched from xemacs to emacs, and I'm trying to get undo/cut/copy/paste 
all working again. In my xemacs setup, I used the following:

(define-key global-map [(f1)] 'undo)
(define-key global-map [(f2)] 'x-kill-primary-selection)
(define-key global-map [(f3)] 'x-copy-primary-selection)
(define-key global-map [(f4)] 'x-yank-clipboard-selection)

I may have done other things also, but this lets me use f1, f2, f3, and f4 for 
these functions. Also, the clipboard is properly imported and exported with 
other X apps. I'm also using Chicken VNC on Mac OS X, and it also properly 
imports/exports the clipboard with MacOS X, although Chicken requires that you 
do an explicit manual import of the MacOS X clipboard each time it changes, but 
at least it's all working.

Now on to the clipboard and emacs. I've tried. I've googled a lot. I've 
experimented a lot. But I still have a lot of problems. I modified the above 
key mapping used in xemacs to the following in emacs:

(define-key global-map [(f1)] 'undo)
(define-key global-map [(f2)] 'delete-region)
(define-key global-map [(f3)] 'kill-ring-save)
(define-key global-map [(f4)] 'yank)

These work within emacs, but will not import or export the clipboard. I've also 
try using the following:

(global-set-key [\C-z] 'undo)
(global-set-key [\C-x] 'clipboard-kill-region)
(global-set-key [\C-c] 'clipboard-kill-ring-save)
(global-set-key [\C-v] 'clipboard-yank)

They seem to end up functioning the same as the f key equivalents. Still no 
import or export of the clipboards.

Also added the following to no avail:

(setq x-select-enable-clipboard t)

The only way I seem to be able to import the clipboard is if I first paste into 
an xemacs buffer, and then use the xemacs Copy menu item (not f4, which won't 
work), and then switch to emacs and use the emacs Paste menu item (not f4 or 
C-v, which won't work). f4 and C-v work after using the Paste menu item 
however. For exporting the clipboard from emacs, I'm forced to paste into a 
clipboard file that I save and open from xemacs so I can then copy the contents 
to the clipboard.

So this is getting very frustrating since I interact with emacs sessions using 
the clipboard a lot, and the above workaround just isn't going to cut it. 
There's got to be a better solution. I'm hoping someone here can help.

thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]