Question

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 then pasting 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.

This happens even when I run emacs -q, or emacs -Q also (don't load user .emacsrc file).

PS. I asked on superuser.com, but no answer in 11 days and stackoverflow.com says programmer tools are good programmer questions. https://superuser.com/questions/600224/cut-paste-into-emacs-not-working-quite-right

(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)

gnome-session

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top