all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bob Nnamtrop <bobnnamtrop@gmail.com>
To: Chong Yidong <cyd@gnu.org>
Cc: 9810@debbugs.gnu.org
Subject: bug#9810: cw in viper mode clobbers clipboard
Date: Sat, 29 Oct 2011 09:26:57 -0600	[thread overview]
Message-ID: <CAKV0tLNF=aSpmF_O_K3i5Jx03a2ceXUL4w7RVuCgVBjmLwVN0g@mail.gmail.com> (raw)
In-Reply-To: <877h3ouznd.fsf@gnu.org>

On Fri, Oct 28, 2011 at 11:37 PM, Chong Yidong <cyd@gnu.org> wrote:
> Bob Nnamtrop <bobnnamtrop@gmail.com> writes:
>
>> I do not consider the selected word when one does 'cw' an active
>> region (in the usual emacs sense). It is a vi construct independent of
>> emacs active regions and so it need not honor the
>> select-active-regions setting.
>
> Could you test the following patch and see if it does what you expect?
>
> === modified file 'lisp/emulation/viper-cmd.el'
> *** lisp/emulation/viper-cmd.el 2011-07-09 19:32:42 +0000
> --- lisp/emulation/viper-cmd.el 2011-10-29 05:36:10 +0000
> ***************
> *** 1387,1393 ****
>        (insert " ")(backward-char 1)))
>    (if (= viper-com-point (point))
>        (viper-forward-char-carefully))
> !   (set-mark viper-com-point)
>    (if (eq m-com 'viper-next-line-at-bol)
>        (viper-enlarge-region (mark t) (point)))
>    (if (< (point) (mark t))
> --- 1387,1393 ----
>        (insert " ")(backward-char 1)))
>    (if (= viper-com-point (point))
>        (viper-forward-char-carefully))
> !   (push-mark viper-com-point t)
>    (if (eq m-com 'viper-next-line-at-bol)
>        (viper-enlarge-region (mark t) (point)))
>    (if (< (point) (mark t))
> ***************
> *** 1396,1403 ****
>        (viper-backward-char-carefully)) ; give back the newline
>    (if (eq viper-intermediate-command 'viper-repeat)
>        (viper-change-subr (mark t) (point))
> !     (viper-change (mark t) (point))
> !     ))
>
>  ;; this is invoked by viper-substitute-line
>  (defun viper-exec-Change (m-com com)
> --- 1396,1403 ----
>        (viper-backward-char-carefully)) ; give back the newline
>    (if (eq viper-intermediate-command 'viper-repeat)
>        (viper-change-subr (mark t) (point))
> !     (viper-change (mark t) (point)))
> !   (viper-deactivate-mark))
>
>  ;; this is invoked by viper-substitute-line
>  (defun viper-exec-Change (m-com com)
>
>

Yes, it makes cw work the way I expect even if select-active-regions is t.

Thanks,
Bob





  reply	other threads:[~2011-10-29 15:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-20 16:18 bug#9810: cw in viper mode clobbers clipboard Bob Nnamtrop
2011-10-20 16:25 ` Lennart Borgman
2011-10-20 16:44   ` Bob Nnamtrop
2011-10-20 16:48     ` Lennart Borgman
2011-10-20 16:57       ` Bob Nnamtrop
2011-10-20 18:46         ` Stefan Monnier
2011-10-20 20:28           ` Bob Nnamtrop
2011-10-20 20:32             ` Lennart Borgman
2011-10-20 21:31             ` Stefan Monnier
2011-10-20 22:12               ` Bob Nnamtrop
2011-10-20 22:38                 ` Bob Nnamtrop
2011-10-21  3:06                   ` Stefan Monnier
2011-10-21  3:05                 ` Stefan Monnier
2011-10-29  5:37             ` Chong Yidong
2011-10-29 15:26               ` Bob Nnamtrop [this message]
2011-10-30  3:39                 ` Chong Yidong
2011-10-20 20:57           ` Bob Nnamtrop
2011-10-20 21:03             ` Lennart Borgman
2011-10-20 16:58     ` Eli Zaretskii
2011-10-20 17:12       ` Bob Nnamtrop
2011-10-20 16:27 ` Eli Zaretskii
2011-10-20 16:48   ` Bob Nnamtrop
2011-10-20 16:58     ` Lennart Borgman
2011-10-20 17:09       ` Bob Nnamtrop
2011-10-20 17:16         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKV0tLNF=aSpmF_O_K3i5Jx03a2ceXUL4w7RVuCgVBjmLwVN0g@mail.gmail.com' \
    --to=bobnnamtrop@gmail.com \
    --cc=9810@debbugs.gnu.org \
    --cc=cyd@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.