From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Tue, 20 Jan 2009 20:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123248401919662 (code B ref -1); Tue, 20 Jan 2009 20:50:02 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 20 Jan 2009 20:40:19 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0KKeA1R019456 for ; Tue, 20 Jan 2009 12:40:12 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPNOK-00063E-9k for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 15:40:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPNOH-0005zl-AN for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 15:40:06 -0500 Received: from [199.232.76.173] (port=48913 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPNOG-0005zF-Nh for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 15:40:05 -0500 Received: from main.gmane.org ([80.91.229.2]:39651 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPNOG-0004VV-6T for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 15:40:04 -0500 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1LPNOE-00079W-F8 for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 20:40:02 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 20 Jan 2009 20:40:02 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 20 Jan 2009 20:40:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Date: Tue, 20 Jan 2009 20:10:58 +0000 Lines: 42 Message-ID: <63k9n3fx.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:fDB8KsJ+g8WPG8HRJ/ftVnwwJSo= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=-=-= Hello all, Asynchronous commands called via shell-command, for example: (shell-command "apt-get update &") fill the buffer *Async Shell Command Output* with Ctrl-Ms, which I'm sure is not what's intended. My patch (attached) fixes this by using make-comint-in-buffer, rather than start-process, to call the asynchronous process. HTH, Sebastian --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=simple.el.diff --- /usr/share/emacs/22.2/lisp/simple-patched.el 2009-01-20 19:51:29.528333079 +0000 +++ /usr/share/emacs/22.2/lisp/simple.el 2008-03-11 01:57:32.000000000 +0000 @@ -1892,11 +1892,10 @@ (erase-buffer) (display-buffer buffer) (setq default-directory directory) - (setq proc (get-buffer-process - (make-comint-in-buffer - "Shell" buffer shell-file-name nil - shell-command-switch command))) + (setq proc (start-process "Shell" buffer shell-file-name + shell-command-switch command)) (setq mode-line-process '(":%s")) + (require 'shell) (shell-mode) (set-process-sentinel proc 'shell-command-sentinel) )) (shell-command-on-region (point) (point) command --=-=-=-- From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Kevin Rodgers , 1973@debbugs.gnu.org Resent-From: Kevin Rodgers Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 21 Jan 2009 05:05:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123251397515599 (code B ref -1); Wed, 21 Jan 2009 05:05:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Jan 2009 04:59:35 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.1 required=4.0 tests=CNSITESPRON,FOURLA, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0L4xUiK015593 for ; Tue, 20 Jan 2009 20:59:32 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPVBa-00084t-7b for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 23:59:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPVBZ-00084R-L5 for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 23:59:29 -0500 Received: from [199.232.76.173] (port=60509 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPVBZ-00084G-H0 for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 23:59:29 -0500 Received: from main.gmane.org ([80.91.229.2]:55595 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPVBY-00084G-RX for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 23:59:29 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LPVBU-0000o2-SC for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2009 04:59:24 +0000 Received: from c-67-161-145-183.hsd1.co.comcast.net ([67.161.145.183]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Jan 2009 04:59:24 +0000 Received: from kevin.d.rodgers by c-67-161-145-183.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Jan 2009 04:59:24 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Kevin Rodgers Date: Tue, 20 Jan 2009 21:59:58 -0700 Lines: 90 Message-ID: References: <63k9n3fx.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-67-161-145-183.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) In-Reply-To: <63k9n3fx.fsf@vps203.linuxvps.org> Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Sebastian Tennant wrote: > Hello all, > > Asynchronous commands called via shell-command, for example: > > (shell-command "apt-get update &") > > fill the buffer *Async Shell Command Output* with Ctrl-Ms, which I'm > sure is not what's intended. > > My patch (attached) fixes this by using make-comint-in-buffer, rather > than start-process, to call the asynchronous process. I don't experience that with emacs -Q on: GNU Emacs 22.3.1 (i386-apple-darwin8.11.1, Carbon Version 1.6.0) What does `C-h C RET' in the *Async Shell Command Output* show? Mine says: Coding system for saving this buffer: Not set locally, use the default. Default coding system (for new files): 1 -- iso-latin-1 (alias: iso-8859-1 latin-1) Coding system for keyboard input: nil Coding system for terminal output: 1 -- iso-8859-1 (alias of iso-latin-1) Defaults for subprocess I/O: decoding: 1 -- iso-latin-1 (alias: iso-8859-1 latin-1) encoding: 1 -- iso-latin-1 (alias: iso-8859-1 latin-1) Priority order for recognizing coding systems when reading files: 1. iso-latin-1 (alias: iso-8859-1 latin-1) 2. mule-utf-8 (alias: utf-8) 3. mule-utf-16be-with-signature (alias: utf-16be-with-signature mule-utf-16-be utf-16-be) 4. mule-utf-16le-with-signature (alias: utf-16le-with-signature mule-utf-16-le utf-16-le) 5. iso-2022-jp (alias: junet) 6. iso-2022-7bit 7. iso-2022-7bit-lock (alias: iso-2022-int-1) 8. iso-2022-8bit-ss2 9. emacs-mule 10. raw-text 11. japanese-shift-jis (alias: shift_jis sjis cp932) 12. chinese-big5 (alias: big5 cn-big5 cp950) 13. no-conversion Other coding systems cannot be distinguished automatically from these, and therefore cannot be recognized automatically with the present coding system priorities. The following are decoded correctly but recognized as iso-2022-7bit-lock: iso-2022-7bit-ss2 iso-2022-7bit-lock-ss2 iso-2022-cn iso-2022-cn-ext iso-2022-jp-2 iso-2022-kr Particular coding systems specified for certain file names: OPERATION TARGET PATTERN CODING SYSTEM(s) --------- -------------- ---------------- File I/O "\\.dz\\'" (no-conversion . no-conversion) "\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" (no-conversion . no-conversion) "\\.tgz\\'" (no-conversion . no-conversion) "\\.tbz\\'" (no-conversion . no-conversion) "\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'" (no-conversion . no-conversion) "\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" (no-conversion . no-conversion) "\\.elc\\'" (emacs-mule . emacs-mule) "\\.utf\\(-8\\)?\\'" utf-8 "\\(\\`\\|/\\)loaddefs.el\\'" (raw-text . raw-text-unix) "\\.tar\\'" (no-conversion . no-conversion) "\\.po[tx]?\\'\\|\\.po\\." po-find-file-coding-system "\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" latexenc-find-file-coding-system "" (undecided) Process I/O nothing specified Network I/O nothing specified -- Kevin Rodgers Denver, Colorado, USA From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 21 Jan 2009 10:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12325340102750 (code B ref -1); Wed, 21 Jan 2009 10:40:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 21 Jan 2009 10:33:30 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: ** X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=2.1 required=4.0 tests=CNSITESPRON,FOURLA,GMAIL, HAS_BUG_NUMBER autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0LAXOrU002744 for ; Wed, 21 Jan 2009 02:33:26 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPaOi-0004Mc-6h for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2009 05:33:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPaOg-0004Ko-Fj for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2009 05:33:22 -0500 Received: from [199.232.76.173] (port=46804 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPaOg-0004Kd-99 for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2009 05:33:22 -0500 Received: from main.gmane.org ([80.91.229.2]:48747 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPaOf-0000dA-Uy for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2009 05:33:22 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LPaOe-0004Pr-IZ for bug-gnu-emacs@gnu.org; Wed, 21 Jan 2009 10:33:20 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Jan 2009 10:33:20 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Jan 2009 10:33:20 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Date: Wed, 21 Jan 2009 10:34:50 +0000 Lines: 73 Message-ID: References: <63k9n3fx.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:cpruiJvyWxQf8e3259EgkePpssw= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Quoth Kevin Rodgers : > What does `C-h C RET' in the *Async Shell Command Output* show? Coding system for saving this buffer: Not set locally, use the default. Default coding system (for new files): u -- mule-utf-8 (alias: utf-8) Coding system for keyboard input: u -- utf-8 (alias of mule-utf-8) Coding system for terminal output: u -- utf-8 (alias of mule-utf-8) Defaults for subprocess I/O: decoding: u -- mule-utf-8 (alias: utf-8) encoding: u -- mule-utf-8 (alias: utf-8) Priority order for recognizing coding systems when reading files: 1. mule-utf-8 (alias: utf-8) 2. iso-latin-1 (alias: iso-8859-1 latin-1) 3. mule-utf-16be-with-signature (alias: utf-16be-with-signature mule-utf-16-be utf-16-be) 4. mule-utf-16le-with-signature (alias: utf-16le-with-signature mule-utf-16-le utf-16-le) 5. iso-2022-jp (alias: junet) 6. iso-2022-7bit 7. iso-2022-7bit-lock (alias: iso-2022-int-1) 8. iso-2022-8bit-ss2 9. emacs-mule 10. raw-text 11. japanese-shift-jis (alias: shift_jis sjis cp932) 12. chinese-big5 (alias: big5 cn-big5 cp950) 13. no-conversion Other coding systems cannot be distinguished automatically from these, and therefore cannot be recognized automatically with the present coding system priorities. The following are decoded correctly but recognized as iso-2022-7bit-lock: iso-2022-7bit-ss2 iso-2022-7bit-lock-ss2 iso-2022-cn iso-2022-cn-ext iso-2022-jp-2 iso-2022-kr Particular coding systems specified for certain file names: OPERATION TARGET PATTERN CODING SYSTEM(s) --------- -------------- ---------------- File I/O "\\.dz\\'" (no-conversion . no-conversion) "\\.g?z\\(~\\|\\.~[0-9]+~\\)?\\'" (no-conversion . no-conversion) "\\.tgz\\'" (no-conversion . no-conversion) "\\.tbz\\'" (no-conversion . no-conversion) "\\.bz2\\(~\\|\\.~[0-9]+~\\)?\\'" (no-conversion . no-conversion) "\\.Z\\(~\\|\\.~[0-9]+~\\)?\\'" (no-conversion . no-conversion) "\\.elc\\'" (emacs-mule . emacs-mule) "\\.utf\\(-8\\)?\\'" utf-8 "\\(\\`\\|/\\)loaddefs.el\\'" (raw-text . raw-text-unix) "\\.tar\\'" (no-conversion . no-conversion) "\\.po[tx]?\\'\\|\\.po\\." po-find-file-coding-system "\\.\\(tex\\|ltx\\|dtx\\|drv\\)\\'" latexenc-find-file-coding-system "" (undecided) Process I/O nothing specified Network I/O nothing specified My ~/.profile contains the line 'export LANG=en_GB.UTF-8' which may explain some of the differences, but it still ain't right. Sebastian From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Stefan Monnier , 1973@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 21 Jan 2009 22:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1973-submit@emacsbugs.donarmstrong.com id=B1973.123257548015537 (code B ref 1973); Wed, 21 Jan 2009 22:10:03 +0000 Received: (at 1973) by emacsbugs.donarmstrong.com; 21 Jan 2009 22:04:40 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from psavcns.com (Hsiamail.ps-av.com [207.138.179.125]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0LM4Z8w015531 for <1973@emacsbugs.donarmstrong.com>; Wed, 21 Jan 2009 14:04:37 -0800 Received: from ceviche.home [64.213.79.190] by psavcns.com with ESMTP (SMTPD32-8.12) id ABE81B1100DE; Wed, 21 Jan 2009 16:04:24 -0600 Received: by ceviche.home (Postfix, from userid 20848) id 331F5B400C; Wed, 21 Jan 2009 17:04:23 -0500 (EST) From: Stefan Monnier To: Sebastian Tennant Cc: 1973@debbugs.gnu.org, bug-gnu-emacs@gnu.org Message-ID: References: <63k9n3fx.fsf@vps203.linuxvps.org> Date: Wed, 21 Jan 2009 17:04:23 -0500 In-Reply-To: <63k9n3fx.fsf@vps203.linuxvps.org> (Sebastian Tennant's message of "Tue, 20 Jan 2009 20:10:58 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Asynchronous commands called via shell-command, for example: > (shell-command "apt-get update &") > fill the buffer *Async Shell Command Output* with Ctrl-Ms, which I'm > sure is not what's intended. > My patch (attached) fixes this by using make-comint-in-buffer, rather > than start-process, to call the asynchronous process. Such a feature would be good, indeed. I'm not sure that just using make-comint-in-buffer is good enough. Maybe we should provide a new command instead, along the lines of comint-run, or maybe even change comint-run so that it accepts a shell command rather than an executable name. Stefan From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 22 Jan 2009 08:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123261385413245 (code B ref -1); Thu, 22 Jan 2009 08:50:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 22 Jan 2009 08:44:14 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0M8iBmT013239 for ; Thu, 22 Jan 2009 00:44:12 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPvAY-0006Gp-PT for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 03:44:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPvAY-0006Gd-Ae for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 03:44:10 -0500 Received: from [199.232.76.173] (port=37429 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPvAY-0006Ga-3T for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 03:44:10 -0500 Received: from vps203.linuxvps.org ([91.186.7.203]:43500) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPvAX-00050r-KD for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 03:44:09 -0500 Received: from root by vps203.linuxvps.org with local (Exim 4.69) (envelope-from ) id 1LPvC1-00074B-Uu; Thu, 22 Jan 2009 08:45:41 +0000 From: Sebastian Tennant To: Stefan Monnier Cc: Sebastian Tennant , 1973@debbugs.gnu.org, bug-gnu-emacs@gnu.org References: <63k9n3fx.fsf@vps203.linuxvps.org> Date: Thu, 22 Jan 2009 08:45:41 +0000 In-Reply-To: (Stefan Monnier's message of "Wed, 21 Jan 2009 17:04:23 -0500") Message-ID: User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Quoth Stefan Monnier : >> Asynchronous commands called via shell-command, for example: > >> (shell-command "apt-get update &") > >> fill the buffer *Async Shell Command Output* with Ctrl-Ms, which I'm >> sure is not what's intended. > >> My patch (attached) fixes this by using make-comint-in-buffer, rather >> than start-process, to call the asynchronous process. > > Such a feature would be good, indeed. Sorry Stefan, I'm not sure what feature it is you are refering to. There seems to be a bug within shell mode that prevents it from handling Ctrl-Ms properly. > I'm not sure that just using make-comint-in-buffer is good enough. > Maybe we should provide a new command instead, along the lines of > comint-run, or maybe even change comint-run so that it accepts a shell > command rather than an executable name. Why? In any case, I suspect we should extend rather than alter, comint mode being the basis for dozens of other 'interpreter modes'. Sebastian From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 22 Jan 2009 14:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123263274327223 (code B ref -1); Thu, 22 Jan 2009 14:05:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 22 Jan 2009 13:59:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0MDwvQC027215 for ; Thu, 22 Jan 2009 05:59:00 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQ05B-0000rh-90 for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 08:58:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQ059-0000qb-Dv for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 08:58:56 -0500 Received: from [199.232.76.173] (port=36174 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQ058-0000qL-7m for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 08:58:55 -0500 Received: from main.gmane.org ([80.91.229.2]:45488 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQ057-0006YR-LT for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 08:58:53 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LQ053-0004wF-J5 for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 13:58:50 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jan 2009 13:58:49 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jan 2009 13:58:49 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Date: Thu, 22 Jan 2009 14:00:26 +0000 Lines: 57 Message-ID: References: <63k9n3fx.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:7Jn3lJg+WSJ6vkbio1NIDvUi3ko= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=-=-= Quoth Sebastian Tennant : > Asynchronous commands called via shell-command, for example: > > (shell-command "apt-get update &") > > fill the buffer *Async Shell Command Output* with Ctrl-Ms, which I'm > sure is not what's intended. > > My patch (attached) fixes this by using make-comint-in-buffer, rather > than start-process, to call the asynchronous process. Actually, this updated patch (attached) is what's required to fix the problem here. It explicitly puts the buffer in comint-mode. (My last patch neglected to do this). Sebastian --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=simple.el.diff --- /usr/share/emacs/22.2/lisp/simple.el~ 2009-01-21 15:12:12.502915265 +0000 +++ /usr/share/emacs/22.2/lisp/simple.el 2009-01-22 13:22:17.352984134 +0000 @@ -1889,13 +1889,14 @@ (error "Shell command in progress"))) (with-current-buffer buffer (setq buffer-read-only nil) - (erase-buffer) + (comint-mode) (erase-buffer) (display-buffer buffer) (setq default-directory directory) - (setq proc (start-process "Shell" buffer shell-file-name - shell-command-switch command)) + (setq proc (get-buffer-process + (make-comint-in-buffer + "Shell" buffer shell-file-name nil + shell-command-switch command))) (setq mode-line-process '(":%s")) - (require 'shell) (shell-mode) (set-process-sentinel proc 'shell-command-sentinel) )) (shell-command-on-region (point) (point) command --=-=-= -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap --=-=-=-- From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: "Stefan Monnier" , 1973@debbugs.gnu.org Resent-From: "Stefan Monnier" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 22 Jan 2009 15:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1973-submit@emacsbugs.donarmstrong.com id=B1973.123263702414384 (code B ref 1973); Thu, 22 Jan 2009 15:15:03 +0000 Received: (at 1973) by emacsbugs.donarmstrong.com; 22 Jan 2009 15:10:24 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mail.g-wis.com (mail.g-wis.com [204.250.154.18]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0MFAGgX013982 for <1973@emacsbugs.donarmstrong.com>; Thu, 22 Jan 2009 07:10:17 -0800 thread-index: Acl8o4TMSeSNbR2mQ7ePnQ+wRXHAtQ== X-Received-From-Address: 69.38.23.210 X-Envelope-From: monnier@iro.umontreal.ca X-Envelope-To: sebyte@smolny.plus.com, bug-gnu-emacs@gnu.org, monnier@iro.umontreal.ca, 1973@debbugs.gnu.org Received: from ceviche.home ([69.38.23.210]) by mail.g-wis.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 22 Jan 2009 07:10:09 -0800 Received: by ceviche.home (Postfix, from userid 20848) id 3E6C6B400C; Thu, 22 Jan 2009 10:09:55 -0500 (EST) From: "Stefan Monnier" To: "Sebastian Tennant" Content-Transfer-Encoding: 7bit Cc: <1973@debbugs.gnu.org>, Message-ID: Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 References: <63k9n3fx.fsf@vps203.linuxvps.org> Date: Thu, 22 Jan 2009 10:09:55 -0500 In-Reply-To: (Sebastian Tennant's messageof "Thu, 22 Jan 2009 08:45:41 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-OriginalArrivalTime: 22 Jan 2009 15:10:09.0797 (UTC) FILETIME=[844DBB50:01C97CA3] >>> Asynchronous commands called via shell-command, for example: >>> (shell-command "apt-get update &") >>> fill the buffer *Async Shell Command Output* with Ctrl-Ms, which I'm >>> sure is not what's intended. >> >>> My patch (attached) fixes this by using make-comint-in-buffer, rather >>> than start-process, to call the asynchronous process. >> >> Such a feature would be good, indeed. > Sorry Stefan, I'm not sure what feature it is you are refering to. The feature of interpreting ^M in the output. > There seems to be a bug within shell mode that prevents it from handling > Ctrl-Ms properly. It's not a bug. shell-command just runs a command and gives you the output of the command. Some commands presume the output is displayed by some kind of terminal and will use terminal commands like ^M (or even ANSI color escape sequences), whereas shell-command was not designed for this purpose. >> I'm not sure that just using make-comint-in-buffer is good enough. >> Maybe we should provide a new command instead, along the lines of >> comint-run, or maybe even change comint-run so that it accepts a shell >> command rather than an executable name. > Why? Because I'm not sure in what kinds of circumstances people use shell-command with an "&" at the end. > In any case, I suspect we should extend rather than alter, comint mode > being the basis for dozens of other 'interpreter modes'. `comint-run' is a command (i.e. for interactive use). I do see that it is occasionally misused from Elisp code (which should use make-comint instead), so we should be somewhat careful indeed when changing it. Stefan From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 22 Jan 2009 18:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123264754225880 (code B ref -1); Thu, 22 Jan 2009 18:15:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 22 Jan 2009 18:05:42 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0MI5VgM025874 for ; Thu, 22 Jan 2009 10:05:34 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQ3vm-0006Yh-SX for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 13:05:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQ3vl-0006W8-4Z for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 13:05:30 -0500 Received: from [199.232.76.173] (port=54596 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQ3vk-0006Vn-Vu for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 13:05:29 -0500 Received: from main.gmane.org ([80.91.229.2]:39695 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQ3vj-0003tC-Ro for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 13:05:28 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LQ3vi-0007a2-NP for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 18:05:26 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jan 2009 18:05:26 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jan 2009 18:05:26 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Date: Thu, 22 Jan 2009 18:07:03 +0000 Lines: 47 Message-ID: References: <63k9n3fx.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:6KQBtPXrpajBNgn5wu8eiMEVqe0= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Quoth "Stefan Monnier" : >> There seems to be a bug within shell mode that prevents it from handling >> Ctrl-Ms properly. > > It's not a bug. shell-command just runs a command and gives you the output > of the command. Some commands presume the output is displayed by some > kind of terminal and will use terminal commands like ^M (or even ANSI > color escape sequences), whereas shell-command was not designed for > this purpose. So the shell mode used in interactive shells (started with M-x shell) is enhanced somehow to handle ^Ms? Note that Kevin Rodgers does not observe the same behaviour: http://article.gmane.org/gmane.emacs.bugs/24348 >>> I'm not sure that just using make-comint-in-buffer is good enough. >>> Maybe we should provide a new command instead, along the lines of >>> comint-run, or maybe even change comint-run so that it accepts a shell >>> command rather than an executable name. >> >> Why? > > Because I'm not sure in what kinds of circumstances people use > shell-command with an "&" at the end. I use it for commands that take a while to complete, so that I can continue doing other things and/or watch what's going on. I expect the buffer to behave/look/feel as much like an ordinary shell as possible. Perhaps this is not typical. I don't know. >> In any case, I suspect we should extend rather than alter, comint mode >> being the basis for dozens of other 'interpreter modes'. > > `comint-run' is a command (i.e. for interactive use). I do see that it > is occasionally misused from Elisp code (which should use make-comint > instead), so we should be somewhat careful indeed when changing it. Noted (and agreed) Sebastian -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 22 Jan 2009 18:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123264876930614 (code B ref -1); Thu, 22 Jan 2009 18:35:02 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 22 Jan 2009 18:26:09 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0MIQ6AS030608 for ; Thu, 22 Jan 2009 10:26:07 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQ4Fh-00041p-E5 for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 13:26:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQ4Fg-00041C-Vo for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 13:26:05 -0500 Received: from [199.232.76.173] (port=34939 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQ4Fg-000411-LV for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 13:26:04 -0500 Received: from main.gmane.org ([80.91.229.2]:48815 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQ4Fg-0007Gh-3l for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 13:26:04 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LQ4FX-0008Vd-Mm for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 18:25:55 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jan 2009 18:25:55 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jan 2009 18:25:55 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Date: Thu, 22 Jan 2009 18:27:31 +0000 Lines: 34 Message-ID: References: <63k9n3fx.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:z1VV6MSTgc1wHRzc0n1gVpIATh8= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Quoth Sebastian Tennant : > Actually, this updated patch (attached) is what's required to fix the > problem here. > > It explicitly puts the buffer in comint-mode. (My last patch neglected > to do this). Correction. The patch does not requre a call to comint-mode. The problem is stranger still. With the first patch I provided (no comint-mode call) applied: $ emacs -Q M-! apt-get update & =| ^Ms abound M-x load-library RET simple.el RET => t M-! apt-get update & =| no ^Ms (in Shell mode) I removed simple.elc before performing the above test so that's not the problem. With the unpatched simple.el in place, loading it manually a second time does not fix the problem so my patch (with or without the call to comint-mode) is still required. Sebastian -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: "Stefan Monnier" , 1973@debbugs.gnu.org Resent-From: "Stefan Monnier" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 22 Jan 2009 21:40:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123265986112298 (code B ref -1); Thu, 22 Jan 2009 21:40:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 22 Jan 2009 21:31:01 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0MLUv4Z012292 for ; Thu, 22 Jan 2009 13:30:59 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQ78a-0000cp-Rs for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 16:30:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQ78Y-0000ZD-Oy for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 16:30:55 -0500 Received: from [199.232.76.173] (port=59368 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQ78Y-0000WE-5k for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 16:30:54 -0500 Received: from mail.g-wis.com ([204.250.154.18]:3161) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LQ78W-0001OJ-G2 for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 16:30:52 -0500 thread-index: Acl82LJmtHrr6JiSSH+AE5fHpWKvbQ== X-Received-From-Address: 69.38.23.210 X-Envelope-From: monnier@iro.umontreal.ca X-Envelope-To: sebyte@smolny.plus.com, bug-gnu-emacs@gnu.org, monnier@iro.umontreal.ca, 1973@debbugs.gnu.org Received: from ceviche.home ([69.38.23.210]) by mail.g-wis.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 22 Jan 2009 13:30:48 -0800 Received: by ceviche.home (Postfix, from userid 20848) id E5BCAB400C; Thu, 22 Jan 2009 16:30:47 -0500 (EST) From: "Stefan Monnier" To: "Sebastian Tennant" Content-Transfer-Encoding: 7bit Cc: <1973@debbugs.gnu.org>, Message-ID: Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 References: <63k9n3fx.fsf@vps203.linuxvps.org> Date: Thu, 22 Jan 2009 16:30:47 -0500 In-Reply-To: (Sebastian Tennant's messageof "Thu, 22 Jan 2009 18:07:03 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-OriginalArrivalTime: 22 Jan 2009 21:30:49.0167 (UTC) FILETIME=[B1A105F0:01C97CD8] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ > So the shell mode used in interactive shells (started with M-x shell) is > enhanced somehow to handle ^Ms? It's actually done in comint-mode rather than just in shell-mode. See comint-carriage-motion. Note that it's an approximation of the actual semantics of ^M in a terminal, because comint-mode doesn't actually provide the usual semantics of a terminal. > Note that Kevin Rodgers does not observe the same behaviour: > http://article.gmane.org/gmane.emacs.bugs/24348 I'm not sure what he's referring to. Stefan From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 22 Jan 2009 23:20:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12326660325657 (code B ref -1); Thu, 22 Jan 2009 23:20:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 22 Jan 2009 23:13:52 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0MNDgif005651 for ; Thu, 22 Jan 2009 15:13:44 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQ8k2-0002YM-52 for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 18:13:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQ8k0-0002Vu-Jw for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 18:13:41 -0500 Received: from [199.232.76.173] (port=44366 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQ8k0-0002Vr-Gk for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 18:13:40 -0500 Received: from main.gmane.org ([80.91.229.2]:35652 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQ8k0-0003V8-7f for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 18:13:40 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LQ8jt-0003FK-16 for bug-gnu-emacs@gnu.org; Thu, 22 Jan 2009 23:13:33 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jan 2009 23:13:33 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 22 Jan 2009 23:13:33 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Date: Thu, 22 Jan 2009 23:15:11 +0000 Lines: 29 Message-ID: <8wp37x1c.fsf@vps203.linuxvps.org> References: <63k9n3fx.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:KTbFb+CGAIfti8tXTRXJgUBizlI= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Quoth "Stefan Monnier" : >> So the shell mode used in interactive shells (started with M-x shell) is >> enhanced somehow to handle ^Ms? > > It's actually done in comint-mode rather than just in shell-mode. > See comint-carriage-motion. Note that it's an approximation of the > actual semantics of ^M in a terminal, because comint-mode doesn't > actually provide the usual semantics of a terminal. Hmm... interesting. I hadn't noticed the comint-carriage-motion function before. So Shell mode (in buffer *shell* for instance) is actually Comint mode masquerading as Shell mode whereas buffer *Async Command Output* is plain Shell mode, not masquerading as anything? >> Note that Kevin Rodgers does not observe the same behaviour: >> http://article.gmane.org/gmane.emacs.bugs/24348 > > I'm not sure what he's referring to. His *Async Command Output* buffer does _not_ display ^M chars when he issues calls to shell-command with arguments ending "&". Seb -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: "Stefan Monnier" , 1973@debbugs.gnu.org Resent-From: "Stefan Monnier" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 23 Jan 2009 08:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12326972235016 (code B ref -1); Fri, 23 Jan 2009 08:00:02 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Jan 2009 07:53:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0N7rZFm005003 for ; Thu, 22 Jan 2009 23:53:36 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQGr8-0000iG-TB for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 02:53:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQGr8-0000hs-5K for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 02:53:34 -0500 Received: from [199.232.76.173] (port=59978 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQGr7-0000hg-RY for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 02:53:33 -0500 Received: from mail.g-wis.com ([204.250.154.18]:1083) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LQGr6-0005It-LL for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 02:53:32 -0500 thread-index: Acl9L68gVfzlo/I5S4++/qa58+NU/g== X-Received-From-Address: 69.38.23.210 X-Envelope-From: monnier@iro.umontreal.ca X-Envelope-To: sebyte@smolny.plus.com, bug-gnu-emacs@gnu.org, monnier@iro.umontreal.ca, 1973@debbugs.gnu.org Received: from ceviche.home ([69.38.23.210]) by mail.g-wis.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 22 Jan 2009 23:53:29 -0800 Received: by ceviche.home (Postfix, from userid 20848) id 1CB47B400C; Fri, 23 Jan 2009 02:53:29 -0500 (EST) From: "Stefan Monnier" To: "Sebastian Tennant" Content-Transfer-Encoding: 7bit Cc: <1973@debbugs.gnu.org>, Message-ID: Content-Class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325 References: <63k9n3fx.fsf@vps203.linuxvps.org><8wp37x1c.fsf@vps203.linuxvps.org> Date: Fri, 23 Jan 2009 02:53:29 -0500 In-Reply-To: <8wp37x1c.fsf@vps203.linuxvps.org> (Sebastian Tennant's messageof "Thu, 22 Jan 2009 23:15:11 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-OriginalArrivalTime: 23 Jan 2009 07:53:30.0151 (UTC) FILETIME=[AE82C370:01C97D2F] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ > So Shell mode (in buffer *shell* for instance) is actually Comint mode > masquerading as Shell mode More specifically, shell-mode is a mode derived from comint-mode (i.e. a submode). > whereas buffer *Async Command Output* is > plain Shell mode, not masquerading as anything? I guess it's using shell-mode, but somehow fails to setup the process's output filter? >>> Note that Kevin Rodgers does not observe the same behaviour: >>> http://article.gmane.org/gmane.emacs.bugs/24348 >> I'm not sure what he's referring to. > His *Async Command Output* buffer does _not_ display ^M chars when he > issues calls to shell-command with arguments ending "&". I don't know how you reach that conclusion. It's a possible interpretation, but it's definitely not the only one. Stefan From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 23 Jan 2009 10:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123270749415142 (code B ref -1); Fri, 23 Jan 2009 10:50:03 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Jan 2009 10:44:54 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0NAin8T015134 for ; Fri, 23 Jan 2009 02:44:51 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQJWq-0005it-U3 for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 05:44:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQJWp-0005i2-Jk for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 05:44:48 -0500 Received: from [199.232.76.173] (port=47051 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQJWp-0005hj-7e for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 05:44:47 -0500 Received: from main.gmane.org ([80.91.229.2]:42719 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQJWo-0004Fe-LP for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 05:44:46 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LQJWl-0003M9-Vk for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 10:44:44 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 23 Jan 2009 10:44:43 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 23 Jan 2009 10:44:43 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Date: Fri, 23 Jan 2009 10:46:18 +0000 Lines: 45 Message-ID: References: <63k9n3fx.fsf@vps203.linuxvps.org> <8wp37x1c.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:XeHoDdVNpuEflXrCNcY5WlSI7HE= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Quoth "Stefan Monnier" : >> So Shell mode (in buffer *shell* for instance) is actually Comint mode >> masquerading as Shell mode > > More specifically, shell-mode is a mode derived from comint-mode > (i.e. a submode). > >> whereas buffer *Async Command Output* is >> plain Shell mode, not masquerading as anything? > > I guess it's using shell-mode, but somehow fails to setup the process's > output filter? Now you're making it sound like a bug, just as I'm starting to accept that it's a misfeature :) >>>> Note that Kevin Rodgers does not observe the same behaviour: >>>> http://article.gmane.org/gmane.emacs.bugs/24348 >>> I'm not sure what he's referring to. >> His *Async Command Output* buffer does _not_ display ^M chars when he >> issues calls to shell-command with arguments ending "&". > > I don't know how you reach that conclusion. It's a possible > interpretation, but it's definitely not the only one. You're right, it's not clear what he means. I started a thread on gmane.emacs.help to clear this up once and for all: http://article.gmane.org/gmane.emacs.help/61581 Only one respondent so far, but that's enough to convince me that it's a misfeature and not a bug, so perhaps we should mark 1973 as done/closed (I'd do this myself but I don't know how). The question for me now is how to make buffer *Async Command Output* behave like buffer *shell*, an odd thing to be doing given that they are both in Shell mode! Sebastian -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 23 Jan 2009 18:05:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123273358726336 (code B ref -1); Fri, 23 Jan 2009 18:05:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Jan 2009 17:59:47 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0NHxgav026330 for ; Fri, 23 Jan 2009 09:59:44 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQQJi-0007Na-57 for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 12:59:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQQJg-0007MH-Oy for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 12:59:41 -0500 Received: from [199.232.76.173] (port=34010 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQQJg-0007M9-IH for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 12:59:40 -0500 Received: from main.gmane.org ([80.91.229.2]:33946 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQQJf-0003VQ-TQ for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 12:59:40 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LQQJd-0006Uq-Ie for bug-gnu-emacs@gnu.org; Fri, 23 Jan 2009 17:59:37 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 23 Jan 2009 17:59:37 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 23 Jan 2009 17:59:37 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Date: Fri, 23 Jan 2009 18:01:13 +0000 Lines: 67 Message-ID: <1vutoqae.fsf@vps203.linuxvps.org> References: <63k9n3fx.fsf@vps203.linuxvps.org> <8wp37x1c.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:dCfJDhn3zHBxnrVkIEVCtgLeiZo= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Quoth Sebastian Tennant : > The question for me now is how to make buffer *Async Command Output* > behave like buffer *shell*, an odd thing to be doing given that they are > both in Shell mode! And I've found a solution, but it's ugly: (add-hook 'shell-mode-hook (lambda () (set-process-filter proc 'comint-output-filter))) No one likes to see the guts of a function (local variable 'proc') in their mode hooks. This works because shell-mode is called after the process is started. --- shell-command snippet --- (with-current-buffer buffer (setq buffer-read-only nil) (erase-buffer) (display-buffer buffer) (setq default-directory directory) (setq proc (start-process "Shell" buffer shell-file-name shell-command-switch command)) (setq mode-line-process '(":%s")) (require 'shell) (shell-mode) (set-process-sentinel proc 'shell-command-sentinel)) --- end of snippet --- The whole thing's a bit of a mess if you ask me. We have two buffers (*shell* and *Async Command Output*) that both claim to be in Shell mode, yet process output is handled completely differently in each case. Why is *Async Command Output* in Shell mode at all if we're not to assume it will only be used for shell commands (that require ^M character handling)? Even replacing the call to shell-mode with a call to comint-mode makes no difference to the way ^M characters are handled. In either case the process filter must be explicitly set to 'comint-ouput-filter. I'd expect something as visually arresting as mangled output to be handled by a mode setting, but hey ho. If it were up to me, I'd rewrite the asynchronous part of shell-command so that make-comint-in-buffer is used to create a Comint mode buffer called *Async Shell Command Output* and leave it at that. After all, the command that creates the buffer is called shell-command so let's assume that's what the buffer is for. I can't think of a single shell command that would depend on ^M characters _not_ being handled in this way for its output to display properly. Can you think of any? Sebastian P.S. Are there any buffer naming conventions in respect to capitalisation of words? The lowercase 's' in *shell* has always struck me as odd alongside *Messages*, *Buffer List* e.t.c. -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 25 Jan 2009 18:05:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12329061941243 (code B ref -1); Sun, 25 Jan 2009 18:05:05 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 25 Jan 2009 17:56:34 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0PHuPxj001237 for ; Sun, 25 Jan 2009 09:56:27 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LR9Dc-0007vL-Vd for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:56:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LR9Db-0007v2-IB for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:56:23 -0500 Received: from [199.232.76.173] (port=35065 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LR9Db-0007ux-Cn for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:56:23 -0500 Received: from main.gmane.org ([80.91.229.2]:57101 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LR9Da-00069z-VA for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 12:56:23 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LR9DY-0001yJ-29 for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2009 17:56:20 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Jan 2009 17:56:20 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Jan 2009 17:56:20 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Date: Sun, 25 Jan 2009 17:58:05 +0000 Lines: 20 Message-ID: <1vuri7yq.fsf@vps203.linuxvps.org> References: <63k9n3fx.fsf@vps203.linuxvps.org> <8wp37x1c.fsf@vps203.linuxvps.org> <1vutoqae.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:ijZWTjsbgqlvaVwMK0hlsH267A8= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Quoth Sebastian Tennant : > No one likes to see the guts of a function (local variable 'proc') in > their mode hooks. This isn't so ugly. http://article.gmane.org/gmane.emacs.help/61630 > The whole thing's a bit of a mess if you ask me. Apologies for the rant! I don't know if you agree with any of it but one thing's for sure; adding async-shell-command-filter-hook to simple.el (and documenting it) solves the problem without changing the implementation of shell-command in any way - a win-win situation, no? Sebastian -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap From rgm@gnu.org Thu Jan 29 09:19:30 2009 Received: (at control) by emacsbugs.donarmstrong.com; 29 Jan 2009 17:19:31 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=VALID_BTS_CONTROL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0THJSGi027537 for ; Thu, 29 Jan 2009 09:19:29 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1LSaWP-0005ym-C2; Thu, 29 Jan 2009 12:17:45 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18817.58553.291619.575915@fencepost.gnu.org> Date: Thu, 29 Jan 2009 12:17:45 -0500 From: Glenn Morris To: control Subject: control message severity 2008 minor tags 2013 moreinfo tags 2046 moreinfo merge 1973 2103 From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Stefan Monnier , 1973@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 02 Feb 2009 18:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 1973-submit@emacsbugs.donarmstrong.com id=B1973.123359764715259 (code B ref 1973); Mon, 02 Feb 2009 18:10:03 +0000 Received: (at 1973) by emacsbugs.donarmstrong.com; 2 Feb 2009 18:00:47 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.5 required=4.0 tests=FAKE_REPLY_C,HAS_BUG_NUMBER, XIRONPORT autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n12I0hHR015253 for <1973@emacsbugs.donarmstrong.com>; Mon, 2 Feb 2009 10:00:45 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswEAPfChknO+IQk/2dsb2JhbACBbsoohBQGgmw X-IronPort-AV: E=Sophos;i="4.37,366,1231131600"; d="scan'208";a="33211581" Received: from 206-248-132-36.dsl.teksavvy.com (HELO pastel.home) ([206.248.132.36]) by ironport2-out.teksavvy.com with ESMTP; 02 Feb 2009 13:00:38 -0500 Received: by pastel.home (Postfix, from userid 20848) id 10CBA8229; Mon, 2 Feb 2009 13:00:38 -0500 (EST) From: Stefan Monnier To: Sebastian Tennant Cc: 1973@debbugs.gnu.org Date: Sat, 24 Jan 2009 16:14:23 -0500 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > > I guess it's using shell-mode, but somehow fails to setup the process's > > output filter? > Now you're making it sound like a bug, just as I'm starting to accept > that it's a misfeature :) One part is whether it should use shell-mode or not. Another is whether, when using shell-mode, it should behave like M-x shell. The second part is clearly a bug. If we decide it shouldn't use shell-mode, then the bug needn't be fixed. But given that it currently uses shell-mode, it seems that (contrary to what I thought) the current intention is for it to behave like shell-mode, in which case it should be fixed. > And I've found a solution, but it's ugly: > (add-hook 'shell-mode-hook > (lambda () > (set-process-filter proc 'comint-output-filter))) > No one likes to see the guts of a function (local variable 'proc') in > their mode hooks. Yes, that's not a good option. Better use neither shell-mode-hook, nor some magic variable name. I think that all that's needed is a good (set-process-filter (get-buffer-process ) 'comint-output-filter) at the right place. Tho, maybe a better option is to change the way the process is started along the lines of what you originally proposed. > We have two buffers (*shell* and *Async Command Output*) that both claim > to be in Shell mode, yet process output is handled completely > differently in each case. Indeed, that's a bug. > Why is *Async Command Output* in Shell mode at all if we're not to > assume it will only be used for shell commands (that require ^M > character handling)? It's probably historical: shell mode hasn't always processed those chars, so in the past the lack of comint-output-filter was simply not noticed. > Even replacing the call to shell-mode with a call to comint-mode makes > no difference to the way ^M characters are handled. In either case the > process filter must be explicitly set to 'comint-ouput-filter. I'd > expect something as visually arresting as mangled output to be handled > by a mode setting, but hey ho. This is a more difficult decision: should calling a major-mode affect the filter of a process that happens to be running in this buffer? Usually, the expectation is that shell-mode (or comint-mode) is not called directly, so the process filter is set by the calling code. > If it were up to me, I'd rewrite the asynchronous part of shell-command > so that make-comint-in-buffer is used to create a Comint mode buffer > called *Async Shell Command Output* and leave it at that. I'm beginning to agree. Stefan From unknown Sat Jun 21 10:44:18 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Reply-To: Sebastian Tennant , 1973@debbugs.gnu.org Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 04 Feb 2009 09:55:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123374070630172 (code B ref -1); Wed, 04 Feb 2009 09:55:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Feb 2009 09:45:06 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n149j08M029902 for ; Wed, 4 Feb 2009 01:45:02 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUeJX-0002Lw-S8 for bug-gnu-emacs@gnu.org; Wed, 04 Feb 2009 04:44:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUeJX-0002Lk-0i for bug-gnu-emacs@gnu.org; Wed, 04 Feb 2009 04:44:59 -0500 Received: from [199.232.76.173] (port=47257 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUeJW-0002Lh-TK for bug-gnu-emacs@gnu.org; Wed, 04 Feb 2009 04:44:58 -0500 Received: from main.gmane.org ([80.91.229.2]:51849 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LUeJW-0001h8-Gc for bug-gnu-emacs@gnu.org; Wed, 04 Feb 2009 04:44:58 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LUeJS-00024s-Pm for bug-gnu-emacs@gnu.org; Wed, 04 Feb 2009 09:44:54 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Feb 2009 09:44:54 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Feb 2009 09:44:54 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Date: Wed, 04 Feb 2009 09:47:02 +0000 Lines: 64 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org X-Host: localhost User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:W6ETxnCWz3qMIj9tgJrD+djXazM= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Quoth Stefan Monnier : >> > I guess it's using shell-mode, but somehow fails to setup the process's >> > output filter? >> Now you're making it sound like a bug, just as I'm starting to accept >> that it's a misfeature :) > > One part is whether it should use shell-mode or not. I dare say it should, given that the command use to create the asynchronous command is called 'shell-command'. > Another is whether, when using shell-mode, it should behave like > M-x shell. > > The second part is clearly a bug. If we decide it shouldn't use > shell-mode, then the bug needn't be fixed. But given that it currently > uses shell-mode, it seems that (contrary to what I thought) the current > intention is for it to behave like shell-mode, in which case it should > be fixed. Agreed. > I think that all that's needed is a good (set-process-filter > (get-buffer-process ) 'comint-output-filter) at the right place. > Tho, maybe a better option is to change the way the process is started > along the lines of what you originally proposed. Indeed, why use start-process and then set the process filter when both can be achieved using make-comint-in-buffer? >> Even replacing the call to shell-mode with a call to comint-mode makes >> no difference to the way ^M characters are handled. In either case the >> process filter must be explicitly set to 'comint-ouput-filter. I'd >> expect something as visually arresting as mangled output to be handled >> by a mode setting, but hey ho. > > This is a more difficult decision: should calling a major-mode affect > the filter of a process that happens to be running in this buffer? I see your point. > Usually, the expectation is that shell-mode (or comint-mode) is not > called directly, so the process filter is set by the calling code. Fair enough. Let's leave it as it is then, and make sure we set it in the calling code. >> If it were up to me, I'd rewrite the asynchronous part of shell-command >> so that make-comint-in-buffer is used to create a Comint mode buffer >> called *Async Shell Command Output* and leave it at that. > > I'm beginning to agree. Cool. Using make-comint-in-buffer definitely seems the way to go but I've changed my mind about in which mode *Async Shell Command* should be. I now think Shell mode (rather than leaving it in Comint mode) is better, simply for the sake of consistency with it's synchronous counterpart. Sebastian -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap From unknown Sat Jun 21 10:44:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Sebastian Tennant Subject: bug#1973 closed by Chong Yidong (Re: Bug in simple.el (Emacs version 22.2.1)) Message-ID: References: <87ocqnneu3.fsf@cyd.mit.edu> <63k9n3fx.fsf@vps203.linuxvps.org> X-Emacs-PR-Message: they-closed 1973 X-Emacs-PR-Package: emacs Reply-To: 1973@debbugs.gnu.org Date: Tue, 11 Aug 2009 04:45:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1249965904-15738-1" This is a multi-part message in MIME format... ------------=_1249965904-15738-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1973: Bug in simple.el (Emacs version 22.2.1) It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 1973: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1973 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1249965904-15738-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 1973-done) by emacsbugs.donarmstrong.com; 11 Aug 2009 04:39:11 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.7 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7B4dAh9015241 for <1973-done@emacsbugs.donarmstrong.com>; Mon, 10 Aug 2009 21:39:11 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 8161657E275; Tue, 11 Aug 2009 00:40:04 -0400 (EDT) From: Chong Yidong To: 1973-done@debbugs.gnu.org Subject: Re: Bug in simple.el (Emacs version 22.2.1) Date: Tue, 11 Aug 2009 00:40:04 -0400 Message-ID: <87ocqnneu3.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Closing Bug#1973, since async-shell-command is now in the trunk. ------------=_1249965904-15738-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 20 Jan 2009 20:40:19 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0KKeA1R019456 for ; Tue, 20 Jan 2009 12:40:12 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPNOK-00063E-9k for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 15:40:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPNOH-0005zl-AN for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 15:40:06 -0500 Received: from [199.232.76.173] (port=48913 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPNOG-0005zF-Nh for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 15:40:05 -0500 Received: from main.gmane.org ([80.91.229.2]:39651 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPNOG-0004VV-6T for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 15:40:04 -0500 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1LPNOE-00079W-F8 for bug-gnu-emacs@gnu.org; Tue, 20 Jan 2009 20:40:02 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 20 Jan 2009 20:40:02 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 20 Jan 2009 20:40:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Subject: Bug in simple.el (Emacs version 22.2.1) Date: Tue, 20 Jan 2009 20:10:58 +0000 Lines: 42 Message-ID: <63k9n3fx.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:fDB8KsJ+g8WPG8HRJ/ftVnwwJSo= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) --=-=-= Hello all, Asynchronous commands called via shell-command, for example: (shell-command "apt-get update &") fill the buffer *Async Shell Command Output* with Ctrl-Ms, which I'm sure is not what's intended. My patch (attached) fixes this by using make-comint-in-buffer, rather than start-process, to call the asynchronous process. HTH, Sebastian --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=simple.el.diff --- /usr/share/emacs/22.2/lisp/simple-patched.el 2009-01-20 19:51:29.528333079 +0000 +++ /usr/share/emacs/22.2/lisp/simple.el 2008-03-11 01:57:32.000000000 +0000 @@ -1892,11 +1892,10 @@ (erase-buffer) (display-buffer buffer) (setq default-directory directory) - (setq proc (get-buffer-process - (make-comint-in-buffer - "Shell" buffer shell-file-name nil - shell-command-switch command))) + (setq proc (start-process "Shell" buffer shell-file-name + shell-command-switch command)) (setq mode-line-process '(":%s")) + (require 'shell) (shell-mode) (set-process-sentinel proc 'shell-command-sentinel) )) (shell-command-on-region (point) (point) command --=-=-=-- ------------=_1249965904-15738-1-- From unknown Sat Jun 21 10:44:18 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Sebastian Tennant Subject: bug#2103 closed by Chong Yidong (Re: Bug in simple.el (Emacs version 22.2.1)) Message-ID: References: <87ocqnneu3.fsf@cyd.mit.edu> X-Emacs-PR-Message: they-closed 2103 X-Emacs-PR-Package: emacs Reply-To: 2103@debbugs.gnu.org Date: Tue, 11 Aug 2009 04:45:05 +0000 Content-Type: multipart/mixed; boundary="----------=_1249965905-15738-3" This is a multi-part message in MIME format... ------------=_1249965905-15738-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #1973: Bug in simple.el It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 1973: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D1973 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1249965905-15738-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 1973-done) by emacsbugs.donarmstrong.com; 11 Aug 2009 04:39:11 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-1.7 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7B4dAh9015241 for <1973-done@emacsbugs.donarmstrong.com>; Mon, 10 Aug 2009 21:39:11 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 8161657E275; Tue, 11 Aug 2009 00:40:04 -0400 (EDT) From: Chong Yidong To: 1973-done@debbugs.gnu.org Subject: Re: Bug in simple.el (Emacs version 22.2.1) Date: Tue, 11 Aug 2009 00:40:04 -0400 Message-ID: <87ocqnneu3.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Closing Bug#1973, since async-shell-command is now in the trunk. ------------=_1249965905-15738-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 29 Jan 2009 07:04:48 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0T74cmN001228 for ; Wed, 28 Jan 2009 23:04:40 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSQx4-0008VH-72 for bug-gnu-emacs@gnu.org; Thu, 29 Jan 2009 02:04:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSQx2-0008Sr-Cy for bug-gnu-emacs@gnu.org; Thu, 29 Jan 2009 02:04:36 -0500 Received: from [199.232.76.173] (port=51414 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSQx2-0008Sf-23 for bug-gnu-emacs@gnu.org; Thu, 29 Jan 2009 02:04:36 -0500 Received: from main.gmane.org ([80.91.229.2]:47059 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LSQx1-0004oH-I0 for bug-gnu-emacs@gnu.org; Thu, 29 Jan 2009 02:04:35 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LSQwu-000337-KJ for bug-gnu-emacs@gnu.org; Thu, 29 Jan 2009 07:04:28 +0000 Received: from vps203.linuxvps.org ([91.186.7.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Jan 2009 07:04:28 +0000 Received: from sebyte by vps203.linuxvps.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 Jan 2009 07:04:28 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Sebastian Tennant Subject: Re: Bug in simple.el Date: Thu, 29 Jan 2009 07:06:22 +0000 Lines: 34 Message-ID: References: <63k0dk26.fsf@vps203.linuxvps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: vps203.linuxvps.org X-Host: localhost User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:T1r0/tKM6YIaGxKNseh+3xw6Ur4= Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Hi Stefan, Returning to the bug list, in case others have opinions on the matter... Quoth Stefan Monnier : >> Apologies for contacting you off-list. I'm doing so just in case you'd >> given up on me. My penultimate email to the Emacs bug list was >> something of a rant! >> >> Since then I think I've found the perfect solution. A hook needs to be >> added to simple.el providing ^M handling and we don't need to change >> anything in shell-command. >> >> http://article.gmane.org/gmane.emacs.help/61630 > > Hooks are great for users, but for internal use they're usually > better avoided since we can change the code directly instead. But in this case, some users may not want ^M handling, so providing a hook gives users the choice, no? > E.g. in this case we want to change shell-command. I agree that given the command is called 'shell-command' it would make sense for ^M characters to be handled in shell-like way, i.e., no ^Ms, in which case perhaps we should provide a spearate command for users who _don't_ want ^M handling; 'unfiltered-shell-command' or something like that? Then again, adding a hook and leaving shell-command as it stands is the simplest option and has the advantage of not breaking anything, i.e., no backward compatibility issues. Seb ------------=_1249965905-15738-3--