Emacs kill ring & X11 clipboard, let’s be friends!
Today is another day of keyboard shortcuts. This time, let’s get some better interaction going between the X11 clipboard and the Emacs kill ring. This way, when you want to copy and paste text between Emacs and other applications, you won’t have to enable menu-bar-mode to use the function.
Putting the following key bindings into your
.emacs should do the trick quite nicely.
(global-set-key "\C-w" 'clipboard-kill-region)
(global-set-key "\M-w" 'clipboard-kill-ring-save)
(global-set-key "\C-y" 'clipboard-yank)