Emacs: How to separate the kill ring from the system clipboard?

和自甴很熟 提交于 2019-12-12 11:32:58

问题


By default Emacs 23.x seems to copy content that's killed to the kill ring and to the system clipboard. Is it possible to keep the kill ring and clipboard separate?

As in, ctrl+k puts stuff on the kill ring, cmd+x puts stuff on the system clipboard and leaves the kill ring alone.


回答1:


That was discussed in this thread:

Setting interprogram-cut-function to nil should do the trick.

if I do a selection the Windows way and do a Ctrl-C or CTRL-Insert, then whatever I selected should be copied to the clipboard.

I think there's no way of doing this out of the box, but you should be able to write a simple command that calls x-select-text, and bind it to whatever keys you want.




回答2:


Put into your .emacs file:

(setq interprogram-cut-function nil)



来源:https://stackoverflow.com/questions/6870979/emacs-how-to-separate-the-kill-ring-from-the-system-clipboard

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!