From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#6085: Eshell doesn't handle ANSI escapes/colors well Date: Sat, 29 May 2010 14:29:22 -0400 Message-ID: <87d3wer27x.fsf@stupidchicken.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1275159469 25886 80.91.229.12 (29 May 2010 18:57:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 May 2010 18:57:49 +0000 (UTC) Cc: 6085-done@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 29 20:57:47 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OIREA-0003CB-L0 for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 May 2010 20:57:46 +0200 Original-Received: from localhost ([127.0.0.1]:35524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIRE9-0005qa-QW for geb-bug-gnu-emacs@m.gmane.org; Sat, 29 May 2010 14:57:45 -0400 Original-Received: from [140.186.70.92] (port=50563 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIRDz-0005od-HK for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 14:57:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIRDy-0007QA-Bz for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 14:57:35 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40487) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIRDy-0007Q5-91 for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 14:57:34 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OIQnL-0003dc-Sv for bug-gnu-emacs@gnu.org; Sat, 29 May 2010 14:30:03 -0400 In-Reply-To: Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 May 2010 18:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 6085 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 6085@debbugs.gnu.org, cyd@stupidchicken.com Original-Received: via spool by 6085-done@debbugs.gnu.org id=D6085.127515777113958 (code D ref 6085); Sat, 29 May 2010 18:30:03 +0000 Original-Received: (at 6085-done) by debbugs.gnu.org; 29 May 2010 18:29:31 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIQmo-0003d5-0y for submit@debbugs.gnu.org; Sat, 29 May 2010 14:29:30 -0400 Original-Received: from pantheon-po41.its.yale.edu ([130.132.50.98]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIQml-0003d0-SZ for 6085-done@debbugs.gnu.org; Sat, 29 May 2010 14:29:28 -0400 Original-Received: from furry (173-14-147-246-NewEngland.hfc.comcastbusiness.net [173.14.147.246]) (authenticated bits=0) by pantheon-po41.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o4TITNoj002620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 29 May 2010 14:29:23 -0400 Original-Received: by furry (Postfix, from userid 1000) id 9A97BC057; Sat, 29 May 2010 14:29:22 -0400 (EDT) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 29 May 2010 14:30:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org 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:37394 Archived-At: >> Eshell doesn't handle a terminal escape code like ^[. >> >> [~/emacs.20100501/lisp/eshell]$ export TERM=xterm-256color >> [~/emacs.20100501/lisp/eshell]$ *grep --color=auto ansi esh-* >> ^[[Kesh-mode.el^[[K^[[K:^[[K eshell-handle-^[[Kansi^[[K-color > > This was working some time ago so maybe looking at what have changed and > reenable this feature should be good. No, this is not a regression. The mess here is due to the ^[[K ("erase line") sequence that colorized grep emits. (I don't know why it needs this control sequence.) There is no sane way for the ansi-color package to handle this. Unlike term.el, it is not intended to be a terminal emulator. The best we can do is to delete such sequences from the output, and I've committed a change to do that.