From: Juri Linkov <juri@jurta.org>
To: Adam Spiers <bug-gnu-emacs@adamspiers.org>
Cc: 4891@emacsbugs.donarmstrong.com
Subject: bug#4891: 23.1; shell-command overwrites whole buffer
Date: Wed, 11 Nov 2009 12:47:21 +0200 [thread overview]
Message-ID: <871vk5shiu.fsf@mail.jurta.org> (raw)
In-Reply-To: <20091109111414.B55872414F@arctic.adamspiers.org> (Adam Spiers's message of "Mon, 9 Nov 2009 11:14:14 +0000 (UTC)")
> Starting emacs 23.1.1 with the '-q' argument and typing:
>
> M-: (shell-command "date" (get-buffer "*scratch*"))
>
> results in the prior contents of the *scratch* buffer being
> overwritten. This seems to contradict the last sentence in the
> following paragraph of the docstring for 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 output is inserted
> after point (leaving mark after it).
Is the following description more precise?
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
replacing the old contents of that buffer.
If OUTPUT-BUFFER is not a buffer and not nil,
insert output in current buffer. (This cannot be done
asynchronously.) In the latter case, the output is inserted
after point (leaving mark after it).
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2009-11-11 10:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <871vk1hyv9.fsf@stupidchicken.com>
2009-11-09 11:14 ` bug#4891: 23.1; shell-command overwrites whole buffer Adam Spiers
2009-11-11 10:47 ` Juri Linkov [this message]
2009-11-12 1:15 ` Adam Spiers
2009-11-12 4:23 ` Stefan Monnier
2009-11-12 6:42 ` Kevin Rodgers
2009-11-12 9:33 ` Adam Spiers
2009-11-14 16:15 ` bug#4891: marked as done (23.1; shell-command overwrites whole buffer) Emacs bug Tracking System
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=871vk5shiu.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=4891@emacsbugs.donarmstrong.com \
--cc=bug-gnu-emacs@adamspiers.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.