Closed fhars closed 2 years ago
Does emacs' compilation mode present itself as a terminal (via isatty
) to the program (I do hope we support non-isatty mode properly already, so perhaps it doesn't)? Does it set something like TERM=dumb
that we could detect instead?
Does emacs' compilation mode present itself as a terminal (via
isatty
) to the program (I do hope we support non-isatty mode properly already, so perhaps it doesn't)? Does it set something likeTERM=dumb
that we could detect instead?
From reading https://github.com/mackwic/colored/issues/108 I understood that it is setting TERM=dumb
. But I don't know if this is the only trigger we want to look out for, or if there is other ones as well?
@fhars Since it is a temporary fix until colored
handles it properly, would it be enough for your purposes to only check TERM=dumb
and disable coloring then?
That would fix the immediate use case of running it in a emacs compilation buffer, but the terminfo database on my system knows about 1332 kinds of terminal that do not have color support. (Although most of these are probably collectors items by now, it's decades since I have seen an operational tek4013).
And given that colored seems to be in deep hibernation for the last years, nothing may last as long as a stopgap measure.
Superseded by #320
The current version of the colored crate ignores the capabilities of the terminal (see https://github.com/mackwic/colored/issues/108), which makes the outupt of probe-run unparseable in e.g. emacs compilation mode. As a temporary workaround, this patch overrides colorization if probe-run is called from a terminal without color support.