From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#14637: recent viper-mode regression Date: Tue, 18 Jun 2013 23:25:20 +0300 Organization: JURTA Message-ID: <87y5a7xj2m.fsf@mail.jurta.org> References: <87sj0hfyqc.fsf@rho.meyering.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1371587474 30138 80.91.229.3 (18 Jun 2013 20:31:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Jun 2013 20:31:14 +0000 (UTC) Cc: 14637-done@debbugs.gnu.org To: Jim Meyering Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 18 22:31:13 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Up2YX-0008S8-Q1 for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jun 2013 22:31:10 +0200 Original-Received: from localhost ([::1]:44363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up2YX-000487-EL for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Jun 2013 16:31:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up2YS-00047Z-Ei for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 16:31:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Up2YR-00043N-9D for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 16:31:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up2YR-00043H-6G for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 16:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Up2YQ-0001Oz-NV for bug-gnu-emacs@gnu.org; Tue, 18 Jun 2013 16:31:02 -0400 Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Jun 2013 20:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 14637 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 14637@debbugs.gnu.org, juri@jurta.org, jim@meyering.net Original-Received: via spool by 14637-done@debbugs.gnu.org id=D14637.13715874305307 (code D ref 14637); Tue, 18 Jun 2013 20:31:01 +0000 Original-Received: (at 14637-done) by debbugs.gnu.org; 18 Jun 2013 20:30:30 +0000 Original-Received: from localhost ([127.0.0.1]:53880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Up2Xt-0001NU-KN for submit@debbugs.gnu.org; Tue, 18 Jun 2013 16:30:30 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:50209 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Up2Xq-0001NF-2v for 14637-done@debbugs.gnu.org; Tue, 18 Jun 2013 16:30:27 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 30FA6258B9E915; Tue, 18 Jun 2013 13:30:24 -0700 (PDT) In-Reply-To: <87sj0hfyqc.fsf@rho.meyering.net> (Jim Meyering's message of "Mon, 17 Jun 2013 00:59:55 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:75314 Archived-At: > Now, however, it merely appends the result, instead of replacing the > source lines. I know nothing about viper-mode, but apparently this regression is caused by revno:112695 that now requires for the callers of `shell-command-on-region' to explicitly specify its argument REPLACE as documented in its docstring for a long time. However, this fix breaks such callers that don't care about providing the correct non-nil REPLACE argument to behave according to the documentation. Grepping for `shell-command-on-region' revealed the exhaustive list of the callers that are fixed now with this patch to set both args OUTPUT-BUFFER and REPLACE to the same value in unison: === modified file 'lisp/emulation/vi.el' --- lisp/emulation/vi.el 2012-09-17 05:41:04 +0000 +++ lisp/emulation/vi.el 2013-06-18 20:17:20 +0000 @@ -1148,7 +1148,8 @@ (defun vi-shell-op (motion-command arg & (cond ((null shell-command) (setq shell-command (read-string "!" nil)) (setq vi-last-shell-command shell-command))) - (shell-command-on-region begin end shell-command (not (vi-prefix-char-value arg))) + (shell-command-on-region begin end shell-command (not (vi-prefix-char-value arg)) + (not (vi-prefix-char-value arg))) t))) (defun vi-shift-op (motion-command arg amount) === modified file 'lisp/emulation/vip.el' --- lisp/emulation/vip.el 2013-03-12 02:08:21 +0000 +++ lisp/emulation/vip.el 2013-06-18 20:17:24 +0000 @@ -775,7 +775,7 @@ (defun vip-execute-com (m-com val com) (if (= com ?!) (setq vip-last-shell-com (vip-read-string "!")) vip-last-shell-com) - t))) + t t))) ((= com ?=) (save-excursion (set-mark vip-com-point) @@ -3042,7 +3042,7 @@ (defun ex-command () (goto-char beg) (set-mark end) (vip-enlarge-region (point) (mark)) - (shell-command-on-region (point) (mark) command t)) + (shell-command-on-region (point) (mark) command t t)) (goto-char beg))))) (defun ex-line-no () === modified file 'lisp/emulation/viper-cmd.el' --- lisp/emulation/viper-cmd.el 2013-05-22 03:21:30 +0000 +++ lisp/emulation/viper-cmd.el 2013-06-18 20:17:31 +0000 @@ -1548,7 +1548,7 @@ (defun viper-exec-bang (m-com com) (car viper-shell-history) )) viper-last-shell-com) - t))) + t t))) (defun viper-exec-equals (m-com com) (save-excursion === modified file 'lisp/emulation/viper-ex.el' --- lisp/emulation/viper-ex.el 2013-05-22 03:21:30 +0000 +++ lisp/emulation/viper-ex.el 2013-06-18 20:17:34 +0000 @@ -2176,7 +2176,7 @@ (defun ex-command () (goto-char beg) (set-mark end) (viper-enlarge-region (point) (mark t)) - (shell-command-on-region (point) (mark t) command t)) + (shell-command-on-region (point) (mark t) command t t)) (goto-char beg))))) (defun ex-compile () === modified file 'lisp/mh-e/mh-alias.el' --- lisp/mh-e/mh-alias.el 2013-01-01 09:11:05 +0000 +++ lisp/mh-e/mh-alias.el 2013-06-18 20:17:37 +0000 @@ -141,7 +141,7 @@ (defun mh-alias-local-users () (insert-file-contents "/etc/passwd"))) ((stringp mh-alias-local-users) (insert mh-alias-local-users "\n") - (shell-command-on-region (point-min) (point-max) mh-alias-local-users t) + (shell-command-on-region (point-min) (point-max) mh-alias-local-users t t) (goto-char (point-min)))) (while (< (point) (point-max)) (cond