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#4891: 23.1; shell-command overwrites whole buffer Date: Wed, 11 Nov 2009 12:47:21 +0200 Organization: JURTA Message-ID: <871vk5shiu.fsf@mail.jurta.org> References: <20091109111414.B55872414F@arctic.adamspiers.org> Reply-To: Juri Linkov , 4891@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1257937684 6783 80.91.229.12 (11 Nov 2009 11:08:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Nov 2009 11:08:04 +0000 (UTC) Cc: 4891@emacsbugs.donarmstrong.com To: Adam Spiers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 11 12:07:54 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N8B3G-00009d-IE for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Nov 2009 12:07:51 +0100 Original-Received: from localhost ([127.0.0.1]:43915 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8B3G-0000j7-4L for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Nov 2009 06:07:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8B2t-0000Mu-Oj for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2009 06:07:27 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8B2o-0000KJ-KR for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2009 06:07:27 -0500 Original-Received: from [199.232.76.173] (port=45379 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8B2o-0000K5-GF for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2009 06:07:22 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:57697) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N8B2n-0002MU-LV for bug-gnu-emacs@gnu.org; Wed, 11 Nov 2009 06:07:22 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nABB7IGG020506; Wed, 11 Nov 2009 03:07:18 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nABB55WD019835; Wed, 11 Nov 2009 03:05:05 -0800 Resent-Date: Wed, 11 Nov 2009 03:05:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Juri Linkov Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Wed, 11 Nov 2009 11:05:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4891 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4891-submit@emacsbugs.donarmstrong.com id=B4891.125793693218985 (code B ref 4891); Wed, 11 Nov 2009 11:05:04 +0000 Original-Received: (at 4891) by emacsbugs.donarmstrong.com; 11 Nov 2009 10:55:32 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nABAtUDC018981 for <4891@emacsbugs.donarmstrong.com>; Wed, 11 Nov 2009 02:55:31 -0800 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Original-Received: from mail.starman.ee (82.131.28.110.cable.starman.ee [82.131.28.110]) by mx1.starman.ee (Postfix) with ESMTP id 02D943F41C4; Wed, 11 Nov 2009 12:55:23 +0200 (EET) In-Reply-To: <20091109111414.B55872414F@arctic.adamspiers.org> (Adam Spiers's message of "Mon, 9 Nov 2009 11:14:14 +0000 (UTC)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Wed, 11 Nov 2009 06:07:26 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32534 > 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/