all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Augusto Stoffel <arstoffel@gmail.com>
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: Fri, 09 Dec 2022 09:20:35 +0200	[thread overview]
Message-ID: <868rjhm57w.fsf@mail.linkov.net> (raw)
In-Reply-To: <875yeled97.fsf@gmail.com> (Augusto Stoffel's message of "Thu, 08 Dec 2022 23:34:12 +0100")

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

Have you tried to replace a number with a marker?  Does it help to fix
this bug?





  reply	other threads:[~2022-12-09  7:20 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
2022-12-09  7:20       ` Juri Linkov [this message]
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=868rjhm57w.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=50207@debbugs.gnu.org \
    --cc=arstoffel@gmail.com \
    --cc=jporterbugs@gmail.com \
    --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.