Emacs: How to separate the kill ring from the syst

2019-06-28 08:23发布

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.

2条回答
We Are One
2楼-- · 2019-06-28 08:50

Put into your .emacs file:

(setq interprogram-cut-function nil)

查看更多
混吃等死
3楼-- · 2019-06-28 08:51

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.

查看更多
登录 后发表回答