From: npostavs@users.sourceforge.net
To: Leo <sdl.web@gmail.com>
Cc: 7485@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#7485: 23.2; Fix removing unrecognized ANSI sequences in ansi-color-apply
Date: Mon, 03 Jul 2017 21:48:16 -0400 [thread overview]
Message-ID: <87eftxht0f.fsf@users.sourceforge.net> (raw)
In-Reply-To: <m1fwunhfms.fsf@cam.ac.uk> (Leo's message of "Fri, 26 Nov 2010 22:41:31 +0000")
close 7485
quit
Leo <sdl.web@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
prev parent reply other threads:[~2017-07-04 1:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-26 14:48 bug#7485: 23.2; Fix removing unrecognized ANSI sequences in ansi-color-apply Leo
2010-11-26 18:55 ` Stefan Monnier
2010-11-26 22:41 ` Leo
2017-07-04 1:48 ` npostavs [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eftxht0f.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=7485@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=sdl.web@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).