Subject: Re: bug#50207: 28.0.50; ansi-color-compilation-filter and rgrep

From: Jim Porter <[email-masked]>
Date: Thu, 26 Aug 2021 23:36:36 -0700

On 8/26/2021 11:06 PM, Juri Linkov wrote:
> 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?

I think that would solve this bug. I don't know that it's necessary 
though: if `grep-filter' does everything correctly (or perhaps, "if it's 
allowed to do everything correctly"), there should be no ANSI escapes 
left for `ansi-color-compilation-filter' to process. `grep-mode' could 
probably just disable `ansi-color-compilation-filter' entirely.

Another, more-involved option would be for `grep-filter' to work more 
like `ansi-color-compilation-filter', i.e. keep track of the active 
escapes to use for the next hunk of text. I *think* this would make it 
more robust for searches spanning multiple lines, but admittedly I 
haven't tested this out to be sure.