all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#6085: Eshell doesn't handle ANSI escapes/colors well
@ 2010-05-03  3:54 Ken Hori
  2010-05-03  5:37 ` Thierry Volpiatto
  2010-05-29 18:29 ` Chong Yidong
  0 siblings, 2 replies; 3+ messages in thread
From: Ken Hori @ 2010-05-03  3:54 UTC (permalink / raw)
  To: 6085

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.







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#6085: Eshell doesn't handle ANSI escapes/colors well
  2010-05-03  3:54 bug#6085: Eshell doesn't handle ANSI escapes/colors well Ken Hori
@ 2010-05-03  5:37 ` Thierry Volpiatto
  2010-05-29 18:29 ` Chong Yidong
  1 sibling, 0 replies; 3+ messages in thread
From: Thierry Volpiatto @ 2010-05-03  5:37 UTC (permalink / raw)
  To: bug-gnu-emacs

Ken Hori <fplemma@gmail.com> writes:

> 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.

This was working some time ago so maybe looking at what have changed and
reenable this feature should be good.

-- 
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/








^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#6085: Eshell doesn't handle ANSI escapes/colors well
  2010-05-03  3:54 bug#6085: Eshell doesn't handle ANSI escapes/colors well Ken Hori
  2010-05-03  5:37 ` Thierry Volpiatto
@ 2010-05-29 18:29 ` Chong Yidong
  1 sibling, 0 replies; 3+ messages in thread
From: Chong Yidong @ 2010-05-29 18:29 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: 6085-done

>> 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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-29 18:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03  3:54 bug#6085: Eshell doesn't handle ANSI escapes/colors well Ken Hori
2010-05-03  5:37 ` Thierry Volpiatto
2010-05-29 18:29 ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.