GNU bug report logs - #23936
25.1.50; shell-command shell-command-on-region doc fix

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Sun, 10 Jul 2016 16:42:02 UTC

Severity: normal

Found in version 25.1.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#23936: closed (25.1.50; shell-command shell-command-on-region
 doc fix)
Date: Sun, 10 Jul 2016 17:56:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 11 Jul 2016 02:55:02 +0900 (JST)
with message-id <alpine.DEB.2.20.1607110254220.28924 <at> calancha-pc>
and subject line 
has caused the debbugs.gnu.org bug report #23936,
regarding 25.1.50; shell-command shell-command-on-region doc fix
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
23936: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23936
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Tino Calancha <tino.calancha <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.50; shell-command shell-command-on-region doc fix
Date: Mon, 11 Jul 2016 01:41:20 +0900 (JST)
Doc strings don't specify correctly when the buffer
is erased, in what buffer position the output is
inserted or when the mark is set.

emacs -Q
;; Evaluate following two forms
(progn
  (switch-to-buffer (get-buffer-create "*out*"))
  (insert (format "1 2\n\n\n\nfoo\n")) ; point is at 12
  (shell-command-on-region 1 4 "printf 'bar\n'" t)) ; point is at 5

(progn
  (switch-to-buffer (get-buffer-create "*out*"))
  (shell-command "date" t)) ; buffer is not erased

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

From 90915fdad69939886a3a1dcc377453b2e98b2089 Mon Sep 17 00:00:00 2001
From: Tino Calancha <tino.calancha <at> gmail.com>
Date: Mon, 11 Jul 2016 01:33:22 +0900
Subject: [PATCH] * lisp/simple.el (shell-command, 
shell-command-on-region):
 Fix doc strings

---
 lisp/simple.el | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index ba026af..cb8c0ce 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3235,11 +3235,11 @@ shell-command

 The optional second argument OUTPUT-BUFFER, if non-nil,
 says to put the output in some other buffer.
-If OUTPUT-BUFFER is a buffer or buffer name, put the output there.
-If OUTPUT-BUFFER is not a buffer and not nil,
-insert output in current buffer.  (This cannot be done asynchronously.)
-In either case, the buffer is first erased, and the output is
-inserted after point (leaving mark after it).
+If OUTPUT-BUFFER is a buffer or buffer name, erase that buffer
+and insert the output there after point.
+If OUTPUT-BUFFER is not a buffer and not nil, insert the output
+in current buffer after point leaving mark after it.
+(This cannot be done asynchronously).

 If the command terminates without error, but generates output,
 and you did not specify \"insert it in the current buffer\",
@@ -3504,10 +3504,10 @@ shell-command-on-region

 Optional fourth arg OUTPUT-BUFFER specifies where to put the
 command's output.  If the value is a buffer or buffer name,
-put the output there.  If the value is nil, use the buffer
-`*Shell Command Output*'.  Any other value, excluding nil,
-means to insert the output in the current buffer.  In either case,
-the output is inserted after point (leaving mark after it).
+erase that buffer and insert the output there.
+If the value is nil, use the buffer `*Shell Command Output*'.
+Any other value, excluding nil, means to insert the output
+in the current buffer after START.

 Optional fifth arg REPLACE, if non-nil, means to insert the
 output in place of text from START to END, putting point and mark
-- 
2.8.1

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

In GNU Emacs 25.1.50.5 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6)
 of 2016-07-10 built on calancha-pc
Repository revision: 04a7977f700fc46cf29d5a41bc7dcffef71044c6



[Message part 3 (message/rfc822, inline)]
From: Tino Calancha <tino.calancha <at> gmail.com>
To: 23936-done <at> debbugs.gnu.org
Date: Mon, 11 Jul 2016 02:55:02 +0900 (JST)
Fixed in master branch


This bug report was last modified 8 years and 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.