emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-bug-tracker] bug#6085: closed (Eshell doesn't handle ANSI escapes


From: GNU bug Tracking System
Subject: [Emacs-bug-tracker] bug#6085: closed (Eshell doesn't handle ANSI escapes/colors well)
Date: Sat, 29 May 2010 18:30:03 +0000

Your message dated Sat, 29 May 2010 14:29:22 -0400
with message-id <address@hidden>
and subject line Re: Eshell doesn't handle ANSI escapes/colors well
has caused the GNU bug report #6085,
regarding Eshell doesn't handle ANSI escapes/colors well
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
6085: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6085
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: Eshell doesn't handle ANSI escapes/colors well Date: Sun, 2 May 2010 20:54:46 -0700
>From Emacs bzr HEAD:

Eshell doesn't handle a terminal escape code like ^[.

My eshell-output-filter-functions:
 '(eshell-output-filter-functions (quote (eshell-handle-ansi-color
eshell-handle-control-codes eshell-watch-for-password-prompt
eshell-postoutput-scroll-to-bottom)))

Example:
[~/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
^[[Kesh-mode.el^[[K^[[K:^[[K(autoload
'^[[Kansi^[[K-color-apply-on-region "^[[Kansi^[[K-color")
^[[Kesh-mode.el^[[K^[[K:^[[K(defun eshell-handle-^[[Kansi^[[K-color ()
^[[Kesh-mode.el^[[K^[[K:^[[K  (^[[Kansi^[[K-color-apply-on-region
eshell-last-output-start
^[[Kesh-mode.el^[[K^[[K:^[[K               'eshell-handle-^[[Kansi^[[K-color)
^[[Kesh-var.el^[[K^[[K:^[[K;; is identical to just saying (lisp); but
with the variable exp^[[Kansi^[[Kon


`term-handle-ansi-escape' from term.el seems to be be handling
ansi escapes very well. Maybe we can integrate  a modified
version of it into Eshell.




--- End Message ---
--- Begin Message --- Subject: Re: Eshell doesn't handle ANSI escapes/colors well Date: Sat, 29 May 2010 14:29:22 -0400
>> 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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]