Subject: bug#9810: cw in viper mode clobbers clipboard

From: Eli Zaretskii <[email-masked]>
Date: Thu, 20 Oct 2011 18:27:13 +0200

> Date: Thu, 20 Oct 2011 10:18:06 -0600
> From: Bob Nnamtrop <[email-masked]>
> 
> emacs -Q
> M-x viper
> i (ie, go into insert mode)
> asdf hjkl (type a few words)
> <escape> (ie, go into command mode)
> click on the 'a' (or move there any way you want)
> double click to put 'asdf' into emacs clipboard (ie X11 clipboard,
> primary, whatever)
> click on the 'h' (or move there any way you want)
> cw (ie viper command to change word)j
> <middle mouse click> (to paste the clipboard, or yank or whatever
> emacs calls it :-)
> hjkl is pasted in
> 
> But 'asdf' should have been pasted in.

Did you read the section "Selection changes" in etc/NEWS?  I think
what you see is the result of a deliberate change in behavior
described there.  In particular, double-clicking a mouse no longer
puts the selected text into the clipboard, only into the PRIMARY
selection.

> This is very annoying and I cannot imagine using the new version if
> this is not fixed.

The above-mentioned section also tells you how to customize Emacs to
get the old behavior back.