Subject: bug#49609: [PATCH] Add option for handling SGR control sequences in compilation-mode

From: Ivan Sokolov <[email-masked]>
Date: Tue, 20 Jul 2021 00:47:45 +0300

Lars Ingebrigtsen <[email-masked]> writes:

> I wonder whether `ansi-color-compilation-filter' should be in
> `compilation-filter-hook' by default?

I don't think so. Well designed (machine readable) output can be parsed
and colored by compilation-mode itself, this filter is most usable in
two cases.

First, if the output is exclusively human readable and cannot be parsed,
it would be nice to have at least a native coloring. Examples: Elixir.

Second, if the output is machine redable, but the tool cannot detect
that the terminal is non-interactive and/or it does not have an option
to turn off colorization, `filter' will allow compilation-mode to
process the output.