From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Tennant Newsgroups: gmane.emacs.bugs Subject: bug#1973: Bug in simple.el (Emacs version 22.2.1) Date: Wed, 04 Feb 2009 09:47:02 +0000 Message-ID: References: Reply-To: Sebastian Tennant , 1973@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1233741884 32029 80.91.229.12 (4 Feb 2009 10:04:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Feb 2009 10:04:44 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 04 11:05:56 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LUecx-0001gX-Sl for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Feb 2009 11:05:11 +0100 Original-Received: from localhost ([127.0.0.1]:36621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUebe-0007A9-8j for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Feb 2009 05:03:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUebY-00079u-AL for bug-gnu-emacs@gnu.org; Wed, 04 Feb 2009 05:03:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUebW-00079i-HP for bug-gnu-emacs@gnu.org; Wed, 04 Feb 2009 05:03:34 -0500 Original-Received: from [199.232.76.173] (port=51152 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUebW-00079f-9x for bug-gnu-emacs@gnu.org; Wed, 04 Feb 2009 05:03:34 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:38471) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LUebV-0003Be-La for bug-gnu-emacs@gnu.org; Wed, 04 Feb 2009 05:03:33 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n14A3VlY002225; Wed, 4 Feb 2009 02:03:31 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n149t4EF032419; Wed, 4 Feb 2009 01:55:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Sebastian Tennant Original-Sender: news Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 04 Feb 2009 09:55:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 1973 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123374070630172 (code B ref -1); Wed, 04 Feb 2009 09:55:04 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 4 Feb 2009 09:45:06 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n149j08M029902 for ; Wed, 4 Feb 2009 01:45:02 -0800 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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/ Original-Lines: 64 Original-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= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 04 Feb 2009 05:03:34 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:24924 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