all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Augusto Stoffel <arstoffel@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: Jim Porter <jporterbugs@gmail.com>,
	Manuel Uberti <manuel.uberti@inventati.org>,
	50207@debbugs.gnu.org
Subject: bug#50207: 28.0.50; ansi-color-compilation-filter and rgrep
Date: Thu, 08 Dec 2022 23:34:12 +0100	[thread overview]
Message-ID: <875yeled97.fsf@gmail.com> (raw)
In-Reply-To: <87lf4nbj1l.fsf@mail.linkov.net> (Juri Linkov's message of "Fri,  27 Aug 2021 09:06:38 +0300")

On Fri, 27 Aug 2021 at 09:06, Juri Linkov wrote:

>>> - (add-hook 'compilation-filter-hook #'ansi-color-compilation-filter)
>>
>> I encountered this a bit ago, and did a bit of diagnosis, but it ended up
>> on my back-burner. I think the issue is due to how the
>> compilation-filter-hooks for grep and ansi-color interact. `grep-filter' is
>> fairly simple and wants to see both the start and end of an ANSI-colorized
>> region, so it "rewinds" to the beginning of a line every time it's
>> called. `ansi-color-compilation-filter', on the other hand, is smart enough
>> to handle the case where it only sees the start of a colorized region in
>> one call, and the end in the next call (see `ansi-color-context' for
>> details).
>
> Would it be possible to solve the problem by adding a new buffer-local
> variable (disabled by default) that will enable line mode for
> `ansi-color-compilation-filter' so that it will handle only complete lines
> like grep mode does?

To complement this a bit, my hunch is that the problem is due to
`compilation-filter-start' being a number and not a marker (bug?).  When
`grep-filter' deletes some characters between `compilation-filter-start'
and the beginning of its line, it causes `ansi-color-compilation-filter'
to skip treating a portion of the buffer.

Or at least I was having this kind of issue in the `grep-heading-mode'
suggested in a recent ticket. :-)





  parent reply	other threads:[~2022-12-08 22:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  5:57 bug#50207: 28.0.50; ansi-color-compilation-filter and rgrep Manuel Uberti
2021-08-26 11:10 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-26 22:11   ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-26 22:33     ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-26 17:07 ` Jim Porter
2021-08-27  6:06   ` Juri Linkov
2021-08-27  6:36     ` Jim Porter
2022-12-07 11:05       ` Augusto Stoffel
2022-12-08 22:34     ` Augusto Stoffel [this message]
2022-12-09  7:20       ` Juri Linkov
2022-12-09 11:57         ` Augusto Stoffel
2022-12-14 16:32         ` Augusto Stoffel
2022-12-15  8:02           ` Juri Linkov

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yeled97.fsf@gmail.com \
    --to=arstoffel@gmail.com \
    --cc=50207@debbugs.gnu.org \
    --cc=jporterbugs@gmail.com \
    --cc=juri@linkov.net \
    --cc=manuel.uberti@inventati.org \
    /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 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.