all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Need help with emacs clipboard.
@ 2015-01-13  2:47 cplum984
  2015-01-14  4:46 ` Bob Proulx
  0 siblings, 1 reply; 11+ messages in thread
From: cplum984 @ 2015-01-13  2:47 UTC (permalink / raw
  To: help-gnu-emacs

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.



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-02-01 13:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13  2:47 Need help with emacs clipboard cplum984
2015-01-14  4:46 ` Bob Proulx
2015-01-14 16:36   ` Harry Putnam
2015-01-14 20:46     ` Bob Proulx
2015-01-15 20:50       ` Harry Putnam
     [not found]       ` <mailman.17973.1421355042.1147.help-gnu-emacs@gnu.org>
2015-01-15 21:05         ` Joost Kremers
2015-01-25 22:53   ` Robert Thorpe
2015-01-31  3:18     ` Bob Proulx
2015-01-31 19:02       ` Robert Thorpe
2015-02-01  4:45         ` Bob Proulx
2015-02-01 13:53           ` Robert Thorpe

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.