6
votes

I'm running GNU Linux and GNU Emacs 23.4.2

When I copy text in Emacs (with M-w, or in CUA mode C-c) and then type C-v in some other application to try to paste the copied text, it doesn't work -- the text from Emacs is not pasted.

However, when I instead copy the text using the Emacs menus (Edit->Copy), this works -- I can successfully paste the copied text into another application with C-v.

How can I fix this, so that copying via the keybindings works the same as copying via the menus?

2
I don't think I understand what you mean by "it works only inside emacs". Changes to your Emacs keybindings will not affect any other application, and I'm at a loss as to why you would think that they might. (If that's not what you meant, perhaps you could re-phrase / clarify that part?)phils
added explanation to questioncnd
I don't understand the explanation either, I'm afraid. Maybe it's getting lost in translation. If no one else can help, some screenshots would probably be a good idea.phils
Please test without CUA in that case, because at present you are presenting this as a problem with CUA, and it may not be related to that at all.phils
I've rewritten your question for you.phils

2 Answers

6
votes

Read the manual, section 25.1.5 Using the Clipboard:

You can customize the variable x-select-enable-clipboard to make the Emacs yank functions consult the clipboard before the primary selection, and to make the kill functions to store in the clipboard as well as the primary selection. Otherwise, these commands do not access the clipboard at all.

You should probably also read section 25.1.3 Cut and Paste with Other Window Applications.

2
votes

Put this in your .emacs (setq x-select-enable-clipboard t)