GNU bug report logs -
#7485
23.2; Fix removing unrecognized ANSI sequences in ansi-color-apply
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Fri, 26 Nov 2010 14:44:02 UTC
Severity: normal
Found in version 23.2
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #16 received at control <at> debbugs.gnu.org (full text, mbox):
close 7485
quit
Leo <sdl.web <at> gmail.com> writes:
> Unrecognized control sequences also begin with char \033. The FRAGMENT
> part of ansi-color-context wasn't supposed to contain actual text,
> otherwise they might get lost. It should always be a fragment of a whole
> ansi control sequence if non-nil.
>
> Let me show how this stops eshell prompt from showing.
>
> Assume ansi-color-apply is in eshell-preoutput-filter-functions. Suppose
> the output of shell command 'ack linux' ends with an unrecognized
> control sequence ^[[K. The whole output string that goes through
> ansi-color-apply is
>
> output of 'ack linux' + 'eshell prompt'.
>
> After 'ack linux' finishes, the FRAGMENT of ansi-color-context becomes:
>
> #("^[[K\n~/.emacs.d $ " 4 17
> (read-only t face eshell-prompt rear-nonsticky
> (face read-only)))
>
> The string after being processed by ansi-color-apply is thus without an
> eshell prompt.
I think this patch is no longer applicable now that I've pushed
[1:35ed01dfb3], ansi-color-apply now skips over every escape sequence,
not just color escape sequences. Although I'm unable to produce the
problem of missing prompts even before my patch (e.g., in 25.2):
~/src $ printf 'ack linux\e[K\n'
ack linux
~/src $
[1: 35ed01dfb3]: 2017-07-03 10:09:40 -0400
Fix and simplify ansi escape detection (Bug#21381)
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=35ed01dfb3f811a997e26d843e9971eb6b81b125
This bug report was last modified 7 years and 327 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.