Emacs and X cut/paste

Apparently the magic incantation that tells Emacs to behave like any other normal X application instead of like a broken and bizarre throwback is (mouse-sel-mode 1). After running that in my init scripts, mouse cut and paste via the middle button now works the way that it does with everything else. (I have no idea if the clipboard works and don't care; I basically never use it.)

The Emacs manual was completely unhelpful. I figured this out by grepping through the elisp source. (Although, he says optimistically, maybe that's because they fixed this in Emacs 22, which I'm not running yet?)

This was the kind of thing that got me to switch to XEmacs in the first place. Emacs has historically had a ridiculous case of Not Invented Here and you have to track down various weird extensions just to make it behave in a vaguely sane fashion. But wow, it's a lot faster than XEmacs and has a lot of other things going for it. Now that I've fixed a bunch of stupid defaults, I'm quite happy with it.

Posted: 2007-07-10 21:04 — Why no comments?

I've never had to use this command with any version of GNU Emacs I've used (from 19.mumble to 21.4) and the mouse seems to work they way I expect. So I'm puzzled by this! The only mouse things I ever have to add are a couple of global-set-keys to make my trackball's scroll wheel work.

Posted by Richard Kettlewell at 2007-07-11 00:41

Without this command, selecting something with the mouse doesn't let me paste it into any other application, and middle-clicking with the mouse in Emacs just pastes in the top of the kill ring. Which is completely unhelpful.

I tried various different configuration settings, including all the various X clipboard options from the manual, and nothing changed this except mouse-sel-mode.

This is Emacs 21.4a.

Posted by eagle at 2007-07-11 08:22

Last spun 2013-07-01 from thread modified 2013-01-04