views:

230

answers:

2

I have (cua-mode t) in my .emacs, so that C-c is copy and C-v is paste just like most other programs on my desktop (Ubuntu, Gnome, Linux). However, Emacs does not seem to share the clipboard/copy buffer with other programs.

For example, if I C-c in Firefox I can S-C-v to paste into a terminal or C-v to paste into gedit. However, if I C-v (or C-y) in emacs, I do not get what I copied from Firefox.

Is there any way to make this work? Is there another command I can use to access the system's copy-paste buffer?

+3  A: 

See clipboard-yank and clipboard-kill-region in the clipboard section of the manual.

jamessan
+1 for having been first.
danlei
Great, that's exactly what I was looking for. I added (x-select-enable-clipboard t) to my .emacs file and everything is working like I'd expect.Thank you.
sligocki
Hm, actually, this isn't exactly right. This will paste from X11 selections. But it's a lot better than it was.
sligocki
+2  A: 

Maybe this EmacsWiki page will help, especially the section where clipboard-kill-region, clipboard-kill-ring-save, and clipboard-yank are mentioned.

danlei
Thanks @danlei, the wiki had some useful advice.
sligocki
You're welcome. EmacsWiki is a great source for everything concerning Emacs.
danlei