Subject: bug#32747: 26; `C-M-w M-w' with non-nil `mouse-drag-copy-region', if selected with mouse

From: Eli Zaretskii <[email-masked]>
Date: Wed, 19 Sep 2018 11:22:05 +0300

> Date: Sun, 16 Sep 2018 14:29:25 -0700 (PDT)
> From: Drew Adams <[email-masked]>
> 
> This is a regression that was apparently introduced in Emacs 24.  Things
> work properly (as documented and as expected) in Emacs 23.4 and prior,
> but not in Emacs 24.5 or later.
>  
> 1. emacs -Q
> 2. (setq mouse-drag-copy-region t) ; Mouse selection copies to kill-ring.
> 3. In *scratch*, select some text, e.g. "This buffer".
> 4. Use `M-w' to copy the selected text to the kill ring.
> 5. With the mouse, select some other text, e.g. "visit that file".
> 6. Use `C-M-w M-w', to append the second selection to the first as the
>    last kill.  The kill should thus be "This buffervisit that file".
> 7. `C-y' to yank the last kill.
>  
> The text yanked should be "This buffervisit that file".  Instead, it is
> "visit that filevisit that file".  That is, the second selection is
> added to the kill ring and appended to itself.

I see something almost opposite:

 . in Emacs 23.4, the above recipe produces the "wrong" behavior,
   unless I set mouse-drag-copy-region to nil (it is t by default)

 . in Emacs 24 and later, mouse-drag-copy-region is nil by default, so
   the recipe works in "emacs -Q" without any customizations, but if I
   set mouse-drag-copy-region to t, I get the old "wrong" Emacs 23
   behavior

So I wonder what is going on with your system that you seem to see
such strikingly different results.