From: "Clément Pit--Claudel" <clement.pit@gmail.com>
To: 23936@debbugs.gnu.org
Subject: bug#23936: 25.1.50; shell-command shell-command-on-region doc fix
Date: Sun, 10 Jul 2016 19:22:13 +0200 [thread overview]
Message-ID: <57828445.3020006@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1607110140200.32384@calancha-pc>
[-- Attachment #1.1: Type: text/plain, Size: 3144 bytes --]
LGTM, but: why do you need to say it's inserted after point, since the buffer is erased anyway?
> +Any other value, excluding nil, means to insert the output
> +in the current buffer after START.
"Any other non-nil value"? I read this wrong on the first read. Doesn't matter much though.
Clément.
On 2016-07-10 18:41, Tino Calancha wrote:
>
> 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@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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2016-07-10 17:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-10 16:41 bug#23936: 25.1.50; shell-command shell-command-on-region doc fix Tino Calancha
2016-07-10 17:22 ` Clément Pit--Claudel [this message]
2016-07-10 17:51 ` Tino Calancha
2016-07-10 17:55 ` bug#23936: (no subject) Tino Calancha
2016-07-10 17:59 ` Noam Postavsky
2016-07-10 18:09 ` Tino Calancha
[not found] ` <handler.23936.D23936.14681733126268.ackdone@debbugs.gnu.org>
2016-07-21 8:48 ` bug#23936: 25.1.50; shell-command shell-command-on-region doc fix Tino Calancha
2016-07-21 8:52 ` Tino Calancha
2016-07-22 5:54 ` Tino Calancha
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57828445.3020006@gmail.com \
--to=clement.pit@gmail.com \
--cc=23936@debbugs.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).