In Emacs, when I have text selected and use the keyboard or left-mouse-button Emacs de-selects my text, and I suspect that is when it copies it into the paste buffer. This prevents me from pasting what I had selected outside Emacs. How do I fix this?

Recreating the problem: If I select text in Emacs, then select text outside Emacs (for example in Xterm or Firefox), then return to Emacs and use the keyboard (for example space, enter, or arrow keys) or click with the left button to move the cursor, then paste I get what I had selected in Emacs, not the text selected from xterm/Firefox. (Yank with Control-Y is the same)

If I don't use the keyboard or left-click it works fine (It pastes what I had highlighted in Xterm/Firefox). If I had no text selected in Emacs before selecting outside Emacs, it works fine.

I am selecting text by dragging over it with the left mouse button. Pasting with the middle mouse button (or Control-Y)

(emacs-version)"GNU Emacs 24.2.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.6.4)
 of 2013-02-02 on buildvm-04.phx2.fedoraproject.org"

cat /etc/redhat-release 
Fedora release 18 (Spherical Cow)

fvwm --replace
  • I'm not able to reproduce the problem on my system... Have you tried disabling your configuration (run emacs -q or emacs -Q) to see whether your .emacs.d could possibly be the culprit? – Francesco May 27 '13 at 9:28
  • Nope. Logout, login, (without fvwm), run emacs -q, and still the same. – 9mjb May 27 '13 at 16:07
  • This is better, but not entirely fixed in Fedora release 19, GNU Emacs 24.3.1 – 9mjb Dec 9 '13 at 23:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.