简体   繁体   中英

Cannot copy text in Emacs and paste into another application

I'm running GNU Linux and GNU Emacs 23.4.2

When I copy text in Emacs (with Mw , or in CUA mode Cc ) and then type Cv 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 Cv .

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

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 .

把它放在你的.emacs中(setq x-select-enable-clipboard t)

Just try

(cua-mode t)

instead.

See also here: http://www.emacswiki.org/emacs/CuaMode

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM