How to copy text from Emacs to another application on Linux

后端 未结 13 2287
被撕碎了的回忆
被撕碎了的回忆 2020-12-07 07:29

When I cut (kill) text in Emacs 22.1.1 (in its own window on X, in KDE, on Kubuntu), I can\'t paste (yank) it in any other application.

13条回答
  •  -上瘾入骨i
    2020-12-07 08:01

    I assume by emacs you are meaning Emacs under X (ie not inside a terminal window).

    There are two ways:

    1. (Applies to unix OS's only) Highlight the desired text with your mouse (this copies it to the X clipboard) and then middle click to paste.
    2. Highlight the desired text and then "M-x clipboard-kill-ring-save" (note you can bind this to an easier key). Then just "Edit->Paste" in your favorite app.

    Clipboard operations available:

    • clipboard-kill-ring-save -- copy selection from Emacs to clipboard
    • clipboard-kill-region -- cut selection from Emacs to clipboard
    • clipboard-yank -- paste from clipboard to Emacs

提交回复
热议问题