From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: sdt@sebyte.me, 62237@debbugs.gnu.org
Subject: bug#62237: 28.1 or higher: 24-bit true color breaks colours in Emacsen built without X under GNU Screen
Date: Mon, 20 Mar 2023 15:08:14 +0100 [thread overview]
Message-ID: <877cvbqzw1.fsf@gmail.com> (raw)
In-Reply-To: <83lejr8vq0.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 20 Mar 2023 14:15:35 +0200")
>>>>> On Mon, 20 Mar 2023 14:15:35 +0200, Eli Zaretskii <eliz@gnu.org> said:
>> From: Robert Pluim <rpluim@gmail.com>
>> Changing the interpretation of the userʼs TERM seems pretty radical to
>> me, even if it will tend to improve usersʼ experience.
Eli> If screen.FOO is not recognizable while FOO is, then we cannot
Eli> possibly break anything by this change, however radical. (But it
Eli> sounds like I misunderstood what is going on here, see below.)
Iʼm sure I donʼt entirely understand whatʼs going on either
>> >> I guess we could do something with not checking COLORTERM under screen
>> >> instead.
>>
Eli> That's a separate issue, from where I stand. Users can unset
Eli> COLORTERM, but their true terminal type will still be "hidden" behind
Eli> the "screen." prefix, won't it? The terminal type is about more than
Eli> just the colors. Or does terminfo know about this "screen." business?
>>
>> I have both a 'screen.xterm-256color' and a 'xterm-256color' terminfo
>> file. I donʼt think terminfo does any prefix stripping, as thereʼs a
>> whole bunch of screen.$TERM files, which would be unnecessary if
>> stripping were happening.
Eli> Are the screen.$TERM files different from the corresponding $TERM
Eli> ones? If so, what are the differences?
$ infocmp screen.xterm-256color xterm-256color
comparing screen.xterm-256color to xterm-256color.
comparing booleans.
bce: F:T.
bw: T:F.
ccc: F:T.
comparing numbers.
comparing strings.
initc: NULL, '\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\'.
invis: NULL, '\E[8m'.
kIC: NULL, '\E[2;2~'.
kNXT: NULL, '\E[6;2~'.
kPRV: NULL, '\E[5;2~'.
kend: '\E[4~', '\EOF'.
khome: '\E[1~', '\EOH'.
kmous: '\E[M', '\E[<'.
oc: NULL, '\E]104\007'.
ritm: NULL, '\E[23m'.
rs1: '\Ec', '\Ec\E]104\007'.
sgr: '%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;m', '%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m'.
sitm: NULL, '\E[3m'.
Eli> And if screen.$TERM files are available in the terminfo DB, then why
Eli> did you suggest to do something in init_tty in the first place?
Becasue the behaviour is different (all under 'screen' in gnome-terminal):
1.
COLORTERM=truecolor TERM=screen.xterm-256color src/emacs -nw -Q etc/NEWS
(display-color-cells) => 16777216
but the display looks black & white, and `list-colors-display' looks
really off.
2.
COLORTERM=truecolor TERM=xterm-256color src/emacs -nw -Q etc/NEWS
(display-color-cells) => 16777216
The display looks more colourful, but `list-colors-display' is still
off.
3.
COLORTERM= TERM=screen.xterm-256color src/emacs -nw -Q etc/NEWS
(display-color-cells) => 256
The display is now colourful, and `list-colors-display' has 256
entries, but:
4.
COLORTERM= TERM=xterm-256color src/emacs -nw -Q etc/NEWS
This is like [3], but the colours are different.
[2] is a definite improvement over [1], but it would be nice if we
could get to [3] or [4] (my gnome-terminal may be too old for proper
truecolor support, itʼs 3.83.3 with VTE 0.62.3)
Eli> Also, what about the lisp/term/ files -- are we loading the right
Eli> files when TERM -s set to screen.SOMETHING? should we?
Weʼre running term/screen.el (which then runs xterm.el)
>> Perhaps the best thing to do is put an entry in etc/PROBLEMS?
Eli> About what? If screen.FOO files are available, then everything should
Eli> already work correctly OOTB, no? Or what am I missing here?
If everything worked OOTB, then yes, but our handling of COLORTERM is
still problematic. If we could delay the 24bit colour support decision
until weʼre in lisp/term I think that would help.
Robert
--
next prev parent reply other threads:[~2023-03-20 14:08 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 9:41 bug#62237: 28.1 or higher: 24-bit true color breaks colours in Emacsen built without X under GNU Screen Sebastian Tennant
2023-03-17 12:15 ` Eli Zaretskii
2023-03-17 15:39 ` Robert Pluim
2023-03-17 16:30 ` Eli Zaretskii
2023-03-17 17:44 ` Robert Pluim
2023-03-17 18:55 ` Eli Zaretskii
2023-03-18 9:05 ` Robert Pluim
2023-03-18 9:09 ` Eli Zaretskii
2023-03-18 10:02 ` Robert Pluim
2023-03-18 10:37 ` Eli Zaretskii
2023-03-18 11:44 ` Robert Pluim
2023-03-18 13:29 ` Eli Zaretskii
2023-03-20 8:36 ` Robert Pluim
2023-03-20 8:57 ` Sebastian Tennant
2023-03-20 12:17 ` Eli Zaretskii
2023-03-20 12:15 ` Eli Zaretskii
2023-03-20 14:08 ` Robert Pluim [this message]
2023-03-20 14:23 ` Eli Zaretskii
2023-03-20 14:51 ` Robert Pluim
2023-03-20 16:26 ` Sebastian Tennant
2023-03-23 8:05 ` Eli Zaretskii
2023-03-18 10:34 ` Sebastian Tennant
2023-03-18 11:38 ` Robert Pluim
2023-03-18 15:01 ` Sebastian Tennant
2023-03-18 15:13 ` Eli Zaretskii
2023-03-18 17:56 ` Sebastian Tennant
2023-03-18 18:35 ` Sebastian Tennant
2023-03-17 16:20 ` Sebastian Tennant
2023-03-17 16:42 ` Eli Zaretskii
2023-03-17 18:31 ` Sebastian Tennant
2023-03-17 19:02 ` Eli Zaretskii
2023-03-17 19:50 ` Eli Zaretskii
2023-03-17 20:18 ` Sebastian Tennant
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cvbqzw1.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=62237@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=sdt@sebyte.me \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).