From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#4343: marked as done (comint-carriage-motion for async-shell-command) Date: Thu, 10 Sep 2009 01:05:05 +0000 Message-ID: References: <87tyzby5xi.fsf@mail.jurta.org> <878wguo23a.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1252544705-21175-0" X-Trace: ger.gmane.org 1252547608 23738 80.91.229.12 (10 Sep 2009 01:53:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 10 Sep 2009 01:53:28 +0000 (UTC) To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 10 03:53:21 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 1MlYqd-0000tt-S6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 10 Sep 2009 03:53:21 +0200 Original-Received: from localhost ([127.0.0.1]:56149 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlYqc-0004Bk-Gd for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Sep 2009 21:53:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlY7w-0005dJ-7I for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2009 21:07:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlY7r-0005ao-B0 for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2009 21:07:07 -0400 Original-Received: from [199.232.76.173] (port=48293 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlY7q-0005aa-TL for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2009 21:07:02 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:58598) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MlY7p-00030q-Qg for bug-gnu-emacs@gnu.org; Wed, 09 Sep 2009 21:07:02 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8A16xLR022046; Wed, 9 Sep 2009 18:06:59 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n8A155KK021510; Wed, 9 Sep 2009 18:05:05 -0700 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 4343 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:30903 Archived-At: This is a multi-part message in MIME format... ------------=_1252544705-21175-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Thu, 10 Sep 2009 03:55:21 +0300 with message-id <87tyzby5xi.fsf@mail.jurta.org> and subject line Re: bug#4343: comint-carriage-motion for async-shell-comma= nd has caused the Emacs bug report #4343, regarding comint-carriage-motion for async-shell-command to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 4343: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D4343 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1252544705-21175-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 4 Sep 2009 21:19:45 +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.2 required=4.0 tests=AWL,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.14.3/8.14.3/Debian-5) with ESMTP id n84LJh1p007126 for ; Fri, 4 Sep 2009 14:19:44 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MjgC7-0005Im-1e for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:19:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MjgC2-0005Eg-5j for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:19:42 -0400 Received: from [199.232.76.173] (port=46362 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MjgC1-0005Ed-VX for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:19:38 -0400 Received: from smtp-out1.starman.ee ([85.253.0.3]:42125 helo=mx1.starman.ee) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MjgC1-00018l-Ew for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2009 17:19:37 -0400 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.70.181.cable.starman.ee [82.131.70.181]) by mx1.starman.ee (Postfix) with ESMTP id 7A01A3F4478 for ; Sat, 5 Sep 2009 00:19:31 +0300 (EEST) From: Juri Linkov To: bug-gnu-emacs@gnu.org Subject: comint-carriage-motion for async-shell-command Organization: JURTA Date: Sat, 05 Sep 2009 00:02:33 +0300 Message-ID: <878wguo23a.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Often an asynchronous shell command run with M-& produces the output that looks like garbage when programs use carriage control characters ^M to display progress with percentages. Even the `compile' command is better in this regard because its `compilation-filter' handles carriage motion using the function `comint-carriage-motion'. The following patch does the same for asynchronous commands in `shell-command'. It seems it was intended to do this anyway because `*Async Shell Command*' uses `shell-mode'. But `shell-mode' doesn't set the filter that processes carriage control characters. It is the `shell' command that sets the filter via `comint-exec' before enabling `shell-mode'. So it's necessary to set the filter explicitly in `shell-command' after enabling `shell-mode': Index: lisp/simple.el =================================================================== RCS file: /sources/emacs/emacs/lisp/simple.el,v retrieving revision 1.1008 diff -u -r1.1008 simple.el --- lisp/simple.el 28 Aug 2009 04:21:17 -0000 1.1008 +++ lisp/simple.el 4 Sep 2009 21:02:21 -0000 @@ -2214,7 +2220,11 @@ (setq mode-line-process '(":%s")) (require 'shell) (shell-mode) (set-process-sentinel proc 'shell-command-sentinel) + ;; Use the comint filter for proper handling of carriage motion + ;; (see `comint-inhibit-carriage-motion'),. + (set-process-filter proc 'comint-output-filter) )) (shell-command-on-region (point) (point) command output-buffer nil error-buffer))))))) -- Juri Linkov http://www.jurta.org/emacs/ ------------=_1252544705-21175-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 4343-done) by emacsbugs.donarmstrong.com; 10 Sep 2009 00:56:20 +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.6 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mx1.starman.ee (smtp-out1.starman.ee [85.253.0.3]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n8A0uIpY019897 for <4343-done@emacsbugs.donarmstrong.com>; Wed, 9 Sep 2009 17:56:19 -0700 X-Virus-Scanned: by Amavisd-New at mx1.starman.ee Received: from mail.starman.ee (82.131.30.70.cable.starman.ee [82.131.30.70]) by mx1.starman.ee (Postfix) with ESMTP id 88E263F4180; Thu, 10 Sep 2009 03:56:10 +0300 (EEST) From: Juri Linkov To: Stefan Monnier Cc: 4343-done@emacsbugs.donarmstrong.com Subject: Re: bug#4343: comint-carriage-motion for async-shell-command Organization: JURTA References: <878wguo23a.fsf@mail.jurta.org> <873a6wzuoc.fsf@mail.jurta.org> Date: Thu, 10 Sep 2009 03:55:21 +0300 In-Reply-To: (Stefan Monnier's message of "Wed, 09 Sep 2009 10:52:15 -0400") Message-ID: <87tyzby5xi.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >> Other than setting `comint-output-filter', `comint-exec' also starts >> a process. But starting a process is not necessary in `shell-command' >> that starts it explicitly. > > OK, then. > >>> And try and move this into a new function `comint-setup-process' which >>> both compile.el and M-& could then use? > >> They can't be merged because `compilation-filter' runs a compile-specific >> hook `compilation-filter-hook'. > > Too bad. Please install your patch, then. Done. -- Juri Linkov http://www.jurta.org/emacs/ ------------=_1252544705-21175-0--