GNU bug report logs -
#62237
28.1 or higher: 24-bit true color breaks colours in Emacsen built without X under GNU Screen
Previous Next
Reported by: Sebastian Tennant <sdt <at> sebyte.me>
Date: Fri, 17 Mar 2023 09:42:02 UTC
Severity: normal
Found in version 28.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>>>>> On Fri, 17 Mar 2023 18:30:23 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
>> From: Robert Pluim <rpluim <at> gmail.com>
>> Cc: Sebastian Tennant <sdt <at> sebyte.me>, 62237 <at> debbugs.gnu.org
>> Date: Fri, 17 Mar 2023 16:39:19 +0100
>>
>> For reasons unknown to me, I actually have COLORTERM=truecolor set in
>> my environment, which tickles this issue. But the only reason it does
>> so is because under screen by default I get
>> TERM=screen.xterm-256color. If I do
>>
>> TERM=xterm-256color src/emacs -Q -nw
>>
>> then I get 24bit colour (according to `display-color-cells')
>>
>> I guess we could drop the 'screen.' prefix in
>> `init_display_interactive', although that does feel like a hack.
Eli> Why not in screen.el?
Because the 24 bit colour detection is done in init_tty. By the time
we get to screen.el itʼs too late.
Eli> Is this screen.FOO format documented somewhere in screen's
Eli> documentation?
Yes:
When screen tries to figure out a terminal name for itself, it first
looks for an entry named "screen.<term>", where <term> is the contents
of your $TERM variable. If no such entry exists, screen tries "screen"
(or "screen-w" if the terminal is wide (132 cols or more)). If even
this entry cannot be found, "vt100" is used as a substitute.
The idea is that if you have a terminal which doesn't support an impor‐
tant feature (e.g. delete char or clear to EOS) you can build a new
termcap/terminfo entry for screen (named "screen.<dumbterm>") in which
this capability has been disabled. If this entry is installed on your
machines you are able to do a rlogin and still keep the correct term‐
--> cap/terminfo entry. The terminal name is put in the $TERM variable of
all new windows. Screen also sets the $TERMCAP variable reflecting the
capabilities of the virtual terminal emulated. Notice that, however, on
machines using the terminfo database this variable has no effect. Fur‐
thermore, the variable $WINDOW is set to the window number of each win‐
dow.
Robert
--
This bug report was last modified 2 years and 58 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.