From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#9810: cw in viper mode clobbers clipboard Date: Sat, 29 Oct 2011 13:37:10 +0800 Message-ID: <877h3ouznd.fsf@gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1319866694 1185 80.91.229.12 (29 Oct 2011 05:38:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 Oct 2011 05:38:14 +0000 (UTC) Cc: 9810@debbugs.gnu.org To: Bob Nnamtrop Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 29 07:38:10 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RK1cQ-0002cK-83 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Oct 2011 07:38:10 +0200 Original-Received: from localhost ([::1]:41096 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK1cP-0003zD-JR for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 Oct 2011 01:38:09 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK1cM-0003yx-1O for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 01:38:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RK1cK-0005bj-Ut for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 01:38:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK1cK-0005bW-S5 for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 01:38:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RK1eE-0008Df-DR for bug-gnu-emacs@gnu.org; Sat, 29 Oct 2011 01:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Oct 2011 05:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9810 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9810-submit@debbugs.gnu.org id=B9810.131986676031539 (code B ref 9810); Sat, 29 Oct 2011 05:40:02 +0000 Original-Received: (at 9810) by debbugs.gnu.org; 29 Oct 2011 05:39:20 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RK1dX-0008Ce-KW for submit@debbugs.gnu.org; Sat, 29 Oct 2011 01:39:20 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RK1dV-0008CW-66 for 9810@debbugs.gnu.org; Sat, 29 Oct 2011 01:39:18 -0400 Original-Received: from [155.69.18.173] (port=56652 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RK1bZ-0003Ca-Pz; Sat, 29 Oct 2011 01:37:18 -0400 In-Reply-To: (Bob Nnamtrop's message of "Thu, 20 Oct 2011 14:28:14 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 29 Oct 2011 01:40:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53275 Archived-At: Bob Nnamtrop 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)