From unknown Sat Sep 06 10:20:47 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5618: 23.1.91; shell-command-on-region unexpectedly erases buffer Resent-From: tomas@tuxteam.de Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Feb 2010 12:13:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5618 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: To: 5618@debbugs.gnu.org Cc: rfrancoise@debian.org X-Debbugs-Original-To: emacs-pretest-bug@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.126684077227522 (code B ref -1); Mon, 22 Feb 2010 12:13:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Feb 2010 12:12:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NjX9T-00079l-97 for submit@debbugs.gnu.org; Mon, 22 Feb 2010 07:12:51 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NjUoj-0005DF-MW for submit@debbugs.gnu.org; Mon, 22 Feb 2010 04:43:06 -0500 Received: from mx10.gnu.org ([199.232.76.166]:40580) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NjUog-0007jp-Re for emacs-pretest-bug@gnu.org; Mon, 22 Feb 2010 04:43:03 -0500 Received: from eggs.gnu.org ([140.186.70.92]:36639) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NjUog-00030j-GG for emacs-pretest-bug@gnu.org; Mon, 22 Feb 2010 04:43:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NjUob-0001Db-OP for emacs-pretest-bug@gnu.org; Mon, 22 Feb 2010 04:43:01 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.0 Received: from alextrapp1.equinoxe.de ([217.22.192.104]:48526 helo=www.elogos.de) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NjUob-0001DW-CA for emacs-pretest-bug@gnu.org; Mon, 22 Feb 2010 04:42:57 -0500 Received: by www.elogos.de (Postfix, from userid 1000) id A1B9590050; Mon, 22 Feb 2010 10:44:13 +0100 (CET) Date: Mon, 22 Feb 2010 10:44:13 +0100 From: tomas@tuxteam.de Message-ID: <20100222094413.GC21836@tomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; x-action=pgp-signed Content-Disposition: inline User-Agent: Mutt/1.5.15+20070412 (2007-04-11) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Spam-Score: -6.6 (------) X-Mailman-Approved-At: Mon, 22 Feb 2010 07:12:37 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This bug report will be sent to the Free Software Foundation, not to your local site managers! Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list, and to the gnu.emacs.bug news group. Please describe exactly what actions triggered the bug and the precise symptoms of the bug. If you can, give a recipe starting from `emacs -Q': - - Start with some buffer with text in it. *scratch* will do fine. - - Put point somewhere in text - - evaluate (shell-command-on-region (point) (point) "/bin/date" (current-buffer) nil) (The actual values of START and END are irrelevant, though). The whole content of the buffer gets replaced by output of command. According to the doc, I'd expect the ouput to be inserted before point. If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /usr/share/emacs/23.1.91/etc/DEBUG. In GNU Emacs 23.1.91.1 (i486-pc-linux-gnu, GTK+ Version 2.12.12) of 2010-01-11 on elegiac, modified by Debian (emacs-snapshot package, version 1:20100111-1~lenny1) Windowing system distributor `The X.Org Foundation', version 11.0.10402000 configured using `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.1.91/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1.91/site-lisp:/usr/share/emacs/site-lisp' '--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS='' 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_ZW.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Help 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 column-number-mode: t line-number-mode: t transient-mark-mode: (only . t) view-mode: t Recent input: C-x b C-x u C-h f c a l l - p r o c e s s - r e M-x c a l l - p r o c e s s n i l SPC M-x C-g C-x o M-x r e p o r Recent messages: uncompressing simple.el.gz...done Note: file is write protected 0 (#o0, #x0) Mark saved where search started Undo! Making completion list... Type C-x 1 to delete the help window. 0 (#o0, #x0) Quit Making completion list... Load-path shadows: /usr/share/emacs/23.1.91/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup Features: (shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils mailheader canlock sha1 hex-util hashcash mail-utils emacsbug multi-isearch jka-compr find-func debug help-mode easymenu view cc-styles cc-align cc-engine cc-vars cc-defs uniquify advice help-fns advice-preload markerpen am-mode easy-mmode am-files diredz regexp-opt wid-edit edmacro kmacro tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind font-render-setting gtk x-toolkit x multi-tty emacs) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFLglHtBcgs9XrR2kYRAgd7AJ4gD7sTtf0hIhR7T7wLHIaPQlR9QwCfUr68 P6oq/qRMBtsYCsNF9/eUl4M= =79DJ -----END PGP SIGNATURE----- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 22 13:01:36 2010 Received: (at control) by debbugs.gnu.org; 22 Feb 2010 18:01:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NjcbA-0003MI-0y for submit@debbugs.gnu.org; Mon, 22 Feb 2010 13:01:36 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Njcb8-0003M8-7s for control@debbugs.gnu.org; Mon, 22 Feb 2010 13:01:34 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1Njcb3-0002D2-QL; Mon, 22 Feb 2010 13:01:29 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19330.50809.741451.244204@fencepost.gnu.org> Date: Mon, 22 Feb 2010 13:01:29 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: black X-Ran: )wwTLG?}&#+)F@V/%`]L^X?-8Q,9@$"V:#L$C*4&Fm1&_G-ny&c[4&!(Wt+MW\ X-Debbugs-No-Ack: yes X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) close 5594 tags 5619 moreinfo reassign 5619 emacs,calendar unmerge 5614 tags 5600 patch tags 5607 patch reassign 5617 emacs,calc severity 5618 minor From unknown Sat Sep 06 10:20:47 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5618: 23.1.91; shell-command-on-region unexpectedly erases buffer In-Reply-To: <20100222094413.GC21836@tomas> Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Feb 2010 18:09:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5618 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: To: tomas@tuxteam.de Cc: 5618@debbugs.gnu.org, rfrancoise@debian.org Received: via spool by 5618-submit@debbugs.gnu.org id=B5618.126694852520849 (code B ref 5618); Tue, 23 Feb 2010 18:09:02 +0000 Received: (at 5618) by debbugs.gnu.org; 23 Feb 2010 18:08:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NjzBc-0005QE-FG for submit@debbugs.gnu.org; Tue, 23 Feb 2010 13:08:44 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NjzBa-0005Q5-H2 for 5618@debbugs.gnu.org; Tue, 23 Feb 2010 13:08:42 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NjzBV-0004pl-Tj; Tue, 23 Feb 2010 13:08:37 -0500 References: <20100222094413.GC21836@tomas> From: Glenn Morris X-Spook: 64 Vauxhall Cross Ortega USDOJ Crowell kilo class SCUD X-Ran: OqfO"=v`9dqIz>&~6p~7w`5JUBL'bZ@=LSNL?6O!nM0cxZwp&o0yJ"o~Fz"H|5y9JTE)^h X-Hue: magenta X-Attribution: GM Date: Tue, 23 Feb 2010 13:08:37 -0500 Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.1 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) tomas@tuxteam.de wrote: > The whole content of the buffer gets replaced by output of > command. According to the doc, I'd expect the ouput to be inserted > before point. I guess this is a documentation bug, in the same way as was http://debbugs.gnu.org/4891 I'm not sure that the installed doc fix for that bug is actually correct. The suggestion in http://debbugs.gnu.org/4891#10 seems correct to me. From unknown Sat Sep 06 10:20:47 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5618: 23.1.91; shell-command-on-region unexpectedly erases buffer Resent-From: tomas@tuxteam.de Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Feb 2010 05:58:01 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5618 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: To: Glenn Morris Cc: 5618@debbugs.gnu.org, rfrancoise@debian.org Received: via spool by 5618-submit@debbugs.gnu.org id=B5618.126699103024276 (code B ref 5618); Wed, 24 Feb 2010 05:58:01 +0000 Received: (at 5618) by debbugs.gnu.org; 24 Feb 2010 05:57:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkAFB-0006JU-JP for submit@debbugs.gnu.org; Wed, 24 Feb 2010 00:57:09 -0500 Received: from alextrapp1.equinoxe.de ([217.22.192.104] helo=www.elogos.de) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkAF8-0006Iw-OU for 5618@debbugs.gnu.org; Wed, 24 Feb 2010 00:57:07 -0500 Received: by www.elogos.de (Postfix, from userid 1000) id 60295900A2; Wed, 24 Feb 2010 06:58:29 +0100 (CET) Date: Wed, 24 Feb 2010 06:58:29 +0100 From: tomas@tuxteam.de Message-ID: <20100224055829.GA9795@tomas> References: <20100222094413.GC21836@tomas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.6 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thanks, Glenn for looking into it. On Tue, Feb 23, 2010 at 01:08:37PM -0500, Glenn Morris wrote: > tomas@tuxteam.de wrote: >=20 > > The whole content of the buffer gets replaced by output of > > command. According to the doc, I'd expect the ouput to be inserted > > before point. >=20 > I guess this is a documentation bug, in the same way as was >=20 > http://debbugs.gnu.org/4891 Yes, I think it's the same "bug". Now if I knew how to merge that... > I'm not sure that the installed doc fix for that bug is actually > correct. The suggestion in >=20 > http://debbugs.gnu.org/4891#10 Except that in our case, even if it's the current buffer, the whole content of the buffer is overwritten as well, rendering the above mentioned doc fix incorrect: "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)" Besides, the behaviour in the current documentation seems way more useful (i.e. _not_ erasing the buffer whenever REPLACE is non-nil). What do you think? > seems correct to me. Half of it, yes, see above. Regards - -- tom=C3=A1s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFLhMAFBcgs9XrR2kYRAghcAJ97B90JiuOcu8Ck+Yt0iCPtRQcw1gCePIY8 XYLgohnxDDQjrsn1OPJf6mY=3D =3D4Z+h -----END PGP SIGNATURE----- From unknown Sat Sep 06 10:20:47 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5618: 23.1.91; shell-command-on-region unexpectedly erases buffer Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Feb 2010 09:21:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5618 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: To: tomas@tuxteam.de Cc: 5618@debbugs.gnu.org, Glenn Morris , rfrancoise@debian.org Received: via spool by 5618-submit@debbugs.gnu.org id=B5618.12671760387525 (code B ref 5618); Fri, 26 Feb 2010 09:21:02 +0000 Received: (at 5618) by debbugs.gnu.org; 26 Feb 2010 09:20:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkwNC-0001xF-31 for submit@debbugs.gnu.org; Fri, 26 Feb 2010 04:20:38 -0500 Received: from smtp-out4.starman.ee ([85.253.0.6] helo=mx2.starman.ee) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NkwMx-0001wj-GB for 5618@debbugs.gnu.org; Fri, 26 Feb 2010 04:20:27 -0500 X-Virus-Scanned: by Amavisd-New at mx2.starman.ee Received: from mail.starman.ee (82.131.30.33.cable.starman.ee [82.131.30.33]) by mx2.starman.ee (Postfix) with ESMTP id 862523F40AB; Fri, 26 Feb 2010 11:20:14 +0200 (EET) From: Juri Linkov Organization: JURTA References: <20100222094413.GC21836@tomas> <20100224055829.GA9795@tomas> Date: Fri, 26 Feb 2010 11:17:19 +0200 In-Reply-To: <20100224055829.GA9795@tomas> (tomas@tuxteam.de's message of "Wed, 24 Feb 2010 06:58:29 +0100") Message-ID: <87r5o8743c.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.9 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.9 (--) >> I'm not sure that the installed doc fix for that bug is actually >> correct. The suggestion in >> >> http://debbugs.gnu.org/4891#10 > > Except that in our case, even if it's the current buffer, the whole > content of the buffer is overwritten as well, rendering the above > mentioned doc fix incorrect: > > "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)" > > Besides, the behaviour in the current documentation seems way more > useful (i.e. _not_ erasing the buffer whenever REPLACE is non-nil). > > What do you think? Are you sure that changing its long-time behaviour won't break some existing packages? >> seems correct to me. > > Half of it, yes, see above. -- Juri Linkov http://www.jurta.org/emacs/ From unknown Sat Sep 06 10:20:47 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5618: 23.1.91; shell-command-on-region unexpectedly erases buffer Resent-From: tomas@tuxteam.de Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Feb 2010 10:12:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5618 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: To: Juri Linkov Cc: 5618@debbugs.gnu.org, Glenn Morris , rfrancoise@debian.org Received: via spool by 5618-submit@debbugs.gnu.org id=B5618.126717906310249 (code B ref 5618); Fri, 26 Feb 2010 10:12:02 +0000 Received: (at 5618) by debbugs.gnu.org; 26 Feb 2010 10:11:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nkx9u-0002et-Iz for submit@debbugs.gnu.org; Fri, 26 Feb 2010 05:11:03 -0500 Received: from alextrapp1.equinoxe.de ([217.22.192.104] helo=www.elogos.de) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nkx9e-0002ec-FD for 5618@debbugs.gnu.org; Fri, 26 Feb 2010 05:10:56 -0500 Received: by www.elogos.de (Postfix, from userid 1000) id 424E190056; Fri, 26 Feb 2010 11:12:17 +0100 (CET) Date: Fri, 26 Feb 2010 11:12:17 +0100 From: tomas@tuxteam.de Message-ID: <20100226101217.GA32676@tomas> References: <20100222094413.GC21836@tomas> <20100224055829.GA9795@tomas> <87r5o8743c.fsf@mail.jurta.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Disposition: inline In-Reply-To: <87r5o8743c.fsf@mail.jurta.org> User-Agent: Mutt/1.5.15+20070412 (2007-04-11) Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.6 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Feb 26, 2010 at 11:17:19AM +0200, Juri Linkov wrote: [...] > > Besides, the behaviour in the current documentation seems way more > > useful (i.e. _not_ erasing the buffer whenever REPLACE is non-nil). > > > > What do you think? >=20 > Are you sure that changing its long-time behaviour won't break > some existing packages? No, of course not. Taking into account that the doc has stated tthis behaviour one might venture to guess that packages wouldn't rely on the "actual" (as opposed to the "documented") behaviour. Still it's a judgement call, and I haven't the insight/experience to perform that. I'd try to offer a patch for the function if consensus arises that this is desirable (but not this week). Regards - -- tom=C3=A1s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFLh56BBcgs9XrR2kYRAgt7AJ9IJD6LDEt5Gc4JL83mLUNNvxd65gCfUVOq uvqlUAuKKiAiRj2xhrcR1zA=3D =3DQCCG -----END PGP SIGNATURE----- From unknown Sat Sep 06 10:20:47 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5618: 23.1.91; shell-command-on-region unexpectedly erases buffer Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 06 Mar 2010 17:35:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5618 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: To: tomas@tuxteam.de Cc: 5618@debbugs.gnu.org, Glenn Morris , rfrancoise@debian.org Received: via spool by 5618-submit@debbugs.gnu.org id=B5618.126789688128433 (code B ref 5618); Sat, 06 Mar 2010 17:35:02 +0000 Received: (at 5618) by debbugs.gnu.org; 6 Mar 2010 17:34:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nnxth-0007OY-9G for submit@debbugs.gnu.org; Sat, 06 Mar 2010 12:34:41 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nnxtf-0007OS-Cq for 5618@debbugs.gnu.org; Sat, 06 Mar 2010 12:34:39 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAJsgkktLd+K+/2dsb2JhbACbS3S1bYR4BIMXHIdY X-IronPort-AV: E=Sophos;i="4.49,595,1262581200"; d="scan'208";a="57650954" Received: from 75-119-226-190.dsl.teksavvy.com (HELO pastel.home) ([75.119.226.190]) by ironport2-out.pppoe.ca with ESMTP; 06 Mar 2010 12:34:34 -0500 Received: by pastel.home (Postfix, from userid 20848) id E2C838866; Sat, 6 Mar 2010 12:34:33 -0500 (EST) From: Stefan Monnier Message-ID: References: <20100222094413.GC21836@tomas> <20100224055829.GA9795@tomas> Date: Sat, 06 Mar 2010 12:34:33 -0500 In-Reply-To: <20100224055829.GA9795@tomas> (tomas@tuxteam.de's message of "Wed, 24 Feb 2010 06:58:29 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > Besides, the behaviour in the current documentation seems way more > useful (i.e. _not_ erasing the buffer whenever REPLACE is non-nil). Agreed. We should try and fix the code to obey the doc more than the converse. If that can introduce backward compatibility problems, then it just means we need to do it more carefully. Stefan From unknown Sat Sep 06 10:20:47 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5618: 23.1.91; shell-command-on-region unexpectedly erases buffer Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jan 2022 18:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5618 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: tomas@tuxteam.de Cc: 5618@debbugs.gnu.org, rfrancoise@debian.org Received: via spool by 5618-submit@debbugs.gnu.org id=B5618.16433082816781 (code B ref 5618); Thu, 27 Jan 2022 18:32:01 +0000 Received: (at 5618) by debbugs.gnu.org; 27 Jan 2022 18:31:21 +0000 Received: from localhost ([127.0.0.1]:56558 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD9YH-0001lI-Bu for submit@debbugs.gnu.org; Thu, 27 Jan 2022 13:31:21 -0500 Received: from quimby.gnus.org ([95.216.78.240]:33854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD9YE-0001l3-Sr for 5618@debbugs.gnu.org; Thu, 27 Jan 2022 13:31:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=69tw+l+89iwOKRTl+aDyFTppXJrVi/YuJ8elfzGQf04=; b=VhqOAYtzICYWPRcK/c7H/W4KZA g1UAFZhyZpbHw6mrYR6DbXYDTrxPeVgMJF9EzsiNBqjFgG79h5C83xlfKuG6Dvsl7gRSza+EbQ9NO g5AlP5qxsultwoDfeh1RvaYcmzTKc/U023XktDIMflNNdlag/aAab+K4m8e8BpzeJwQA=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nD9Y5-00016p-9Q; Thu, 27 Jan 2022 19:31:12 +0100 From: Lars Ingebrigtsen References: <20100222094413.GC21836@tomas> X-Now-Playing: David Sylvian's _Everything And Nothing (1)_: "Blackwater" Date: Thu, 27 Jan 2022 19:31:08 +0100 In-Reply-To: <20100222094413.GC21836@tomas> (tomas@tuxteam.de's message of "Mon, 22 Feb 2010 10:44:13 +0100") Message-ID: <87czkdjaj7.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tomas@tuxteam.de writes: > - Start with some buffer with text in it. *scratch* will do fine. > - Put point somewhere in text > - evaluate (shell-command-on-region (point) (point) "/bin/date" (current-buffer) nil) > > (The act [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tomas@tuxteam.de writes: > - Start with some buffer with text in it. *scratch* will do fine. > - Put point somewhere in text > - evaluate (shell-command-on-region (point) (point) "/bin/date" (current-buffer) nil) > > (The actual values of START and END are irrelevant, though). > > The whole content of the buffer gets replaced by output of > command. According to the doc, I'd expect the ouput to be inserted > before point. (I'm going through old bug reports that unfortunately weren't resolved at the time.) The behaviour has now been documented as such: ---- Optional fourth arg OUTPUT-BUFFER specifies where to put the command's output. If the value is a buffer or buffer name, erase that buffer and insert the output there; a non-nil value of `shell-command-dont-erase-buffer' prevent to erase the buffer. If the value is nil, use the buffer specified by `shell-command-buffer-name'. Any other non-nil value means to insert the output in the current buffer after START. ---- And we've grown an extra user option (that's... pretty confusing in itself, I think). So while the semantics here are far less than ideal, I don't think there's anything further to do here, and I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 27 13:31:28 2022 Received: (at control) by debbugs.gnu.org; 27 Jan 2022 18:31:29 +0000 Received: from localhost ([127.0.0.1]:56561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD9YO-0001ld-MW for submit@debbugs.gnu.org; Thu, 27 Jan 2022 13:31:28 -0500 Received: from quimby.gnus.org ([95.216.78.240]:33870) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nD9YJ-0001l9-Vw for control@debbugs.gnu.org; Thu, 27 Jan 2022 13:31:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rdH282dwY/ghZQ1Gdm9P8erhb3PvDM9Tzjmoyx3fOyM=; b=HBru1O/FKj/MJszJZS4Mfn+9J/ 4JPe0y+mf4MPCwhkILRI8qiHDGl+DKmscFX0eqmp8J1zsbCUdvkZRD1ige6qFEwIVB7Bu5xMbSRF4 svTBCSPT1eNPM+JaTcupdr7HTBbSuuPo1hmzvVEvTgaNL1X6MpZfAzjyp6oAWvLIbPpk=; Received: from [84.212.220.105] (helo=giant) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nD9YC-00016w-2a for control@debbugs.gnu.org; Thu, 27 Jan 2022 19:31:18 +0100 Date: Thu, 27 Jan 2022 19:31:15 +0100 Message-Id: <87bkzxjaj0.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #5618 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 5618 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 5618 quit