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

From: Bob Nnamtrop <[email-masked]>
Date: Thu, 20 Oct 2011 10:18:06 -0600

As the title says, in viper command mode typing cw (ie change word)
causes the emacs clipboard (not sure the proper name for it, but the
thing I expect a middle mouse button to paste into the buffer) to get
clobbered. This is a regression over all previous versions (actually I
remember this bug occurring a long time ago and getting fixed so
something must have broken it again). To replicate:

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. This also occurs with other
commands like 'ct', etc. This is very annoying and I cannot imagine
using the new version if this is not fixed.

Thanks much,
Bob

In GNU Emacs 24.0.90.1 (x86_64-apple-darwin10.8.0, X toolkit, Xaw3d scroll bars)
 of 2011-10-04 on where.i.am
Windowing system distributor `The X.Org Foundation', version 11.0.11003000
configured using `configure
'--prefix=/Users/name/local-emacs-24.0.90' '--with-x-toolkit=athena''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x v i p e r - o <backspace> <backspace> <return>
i a s d f SPC h j k l <escape> 0 <down-mouse-1> <mouse-1>
<double-down-mouse-1> <double-mouse-1> <down-mouse-1>
<mouse-1> c w <down-mouse-2> <mouse-2> <escape> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <help-echo> <menu-bar>
<help-menu> <send-emacs-bug-report>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading viper...
Loading /Users/name/.viper...done
Loading viper...done

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message format-spec rfc822 mml easymenu
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug tabify viper viper-ex viper-macs viper-mous viper-cmd
viper-keym ring viper-util viper-init advice help-fns advice-preload
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty emacs)