Subject: Re: bug#18376: 24.3; yanking (hopefully from clipboard) differs from mouse-yanking

From: Stefan Monnier <[email-masked]>
Date: Tue, 09 Sep 2014 20:38:31 -0400

tags 18376 notabug
thanks

> with emacs -q
> type any word, cut it, yank it a couple times
> select the entire thing with the mouse
> now yank still pastes only the word
> while middle click (calling mouse-yank-primary) pastes the entire
> selected text
> Desired behaviour : yank should paste the same text as middle-click
> x-select-enable-clipboard's value is t

This is on purpose.  More specifically, this is the "standard X11
behavior" where mouse-selection and mouse-middle-click operate on the
PRIMARY selection, whereas cut&paste (aka kill&yank) operate on the
CLIPBOARD selection.

This was changed in Emacs-24.1.  Search for "Selection changes" in the
etc/NEWS file.  It includes explanation of what was changed and how to
revert some of those changes if you don't like them.  IIRC if you want
middle click to insert from the clipboard, you should bind mouse-2 to
mouse-yank-at-click.

        Stefan