Wednesday, June 08, 2016

Emacs 24.1 copy and paste

I have been an Emacs user for years. And my time of using Emacs on Windows has already surpassed that of using on Unix. One operation I perform a lot is highlighting a section of text and then either hit Ctrl-Y in Emacs to copy it or Ctrl-C in other Windows application. That's actually not the "correct" X-Windows behavior so it was corrected in Emacs 24.1 and up. However, I am so used to this and need it back! From this link:

Here are the exact lines to put in your .emacs (C-x C-f RET and enter ~/.emacs) file:
(setq select-active-regions nil)
(setq mouse-drag-copy-region t)
(global-set-key [mouse-2] 'mouse-yank-at-click)