From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adam Spiers Newsgroups: gmane.emacs.bugs Subject: bug#4891: 23.1; shell-command overwrites whole buffer Date: Mon, 9 Nov 2009 11:14:14 +0000 (UTC) Message-ID: <20091109111414.B55872414F@arctic.adamspiers.org> Reply-To: Adam Spiers , 4891@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1257870023 24207 80.91.229.12 (10 Nov 2009 16:20:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Nov 2009 16:20:23 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 10 17:20:16 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 1N7tS1-0000xV-OA for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Nov 2009 17:20:14 +0100 Original-Received: from localhost ([127.0.0.1]:46997 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7tS1-0006Bs-14 for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Nov 2009 11:20:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7SPa-0007xM-Hh for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 06:27:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7SPU-0007wY-JP for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 06:27:52 -0500 Original-Received: from [199.232.76.173] (port=41259 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7SPU-0007wV-7N for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 06:27:48 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:49222) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N7SPT-0006sE-Ey for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 06:27:47 -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 nA9BRHvQ002146; Mon, 9 Nov 2009 03:27:17 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nA9BK4St001389; Mon, 9 Nov 2009 03:20:04 -0800 Resent-Date: Mon, 9 Nov 2009 03:20:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Adam Spiers Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Mon, 09 Nov 2009 11:20:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4891 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.1257765267910 (code B ref -1); Mon, 09 Nov 2009 11:20:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 9 Nov 2009 11:14:27 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA9BEPXw000907 for ; Mon, 9 Nov 2009 03:14:26 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7SCW-0002eM-II for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 06:14:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7SCP-0002d7-PE for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 06:14:22 -0500 Original-Received: from [199.232.76.173] (port=34356 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7SCP-0002d4-EM for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 06:14:17 -0500 Original-Received: from arctic.adamspiers.org ([212.13.194.176]:51756) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N7SCO-0004Cx-WF for bug-gnu-emacs@gnu.org; Mon, 09 Nov 2009 06:14:17 -0500 Original-Received: from localhost (dsl-217-155-199-114.zen.co.uk [217.155.199.114]) by arctic.adamspiers.org (Postfix) with ESMTP id B55872414F for ; Mon, 9 Nov 2009 11:14:14 +0000 (UTC) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Mon, 09 Nov 2009 06:27:52 -0500 X-Mailman-Approved-At: Tue, 10 Nov 2009 11:20:05 -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:32514 Archived-At: 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). In GNU Emacs 23.1.1 (i386-redhat-linux-gnu, GTK+ Version 2.16.6) of 2009-09-29 on x86-7.fedora.phx.redhat.com Windowing system distributor `The X.Org Foundation', version 11.0.10603901 configured using `configure '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i586-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i586-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-bu ffer-size=4 -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_GB.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-: ( s h e l l - c o m m a n d SPC " d a t e " S-SPC ( g e t - b u f f e r SPC " * s c r a t c h * " ) ) C-x b M-x r e p o r Recent messages: Loading /usr/share/emacs/site-lisp/site-start.d/muse-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/php-mode-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/po-mode-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/rpm-spec-mode-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/rpmdev-init.el (source)...done Loading /usr/share/emacs/site-lisp/site-start.d/ruby-mode-init.el (source)...done For information about GNU Emacs and the GNU system, type C-h C-a. Mon Nov 9 10:38:11 GMT 2009 0 (#o0, #x0) Making completion list...