unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Sebastian Tennant <sdt@sebyte.me>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Robert Pluim <rpluim@gmail.com>, 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: Sat, 18 Mar 2023 10:34:10 +0000	[thread overview]
Message-ID: <87leju4acd.fsf@sebyte.me> (raw)
In-Reply-To: <83v8iybf49.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 18 Mar 2023 11:09:10 +0200")

Quoth Eli Zaretskii <eliz@gnu.org>
on Sat, 18 Mar 2023 11:09:10 +0200:
>>>> […] machines you are able to do a rlogin and still keep the
>>>> correct termcap/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.  Furthermore, the variable
>>>> $WINDOW is set to the window number of each window.
>>>>
>>> This seems to tell how 'screen' figures out the terminal name, not
>>> how it sets TERM.  I asked who and why sets TERM to
>>> screen.SOMETHING.
>>>
>> screen does: "The terminal name is put in the $TERM variable of all
>> new windows."
>>
> So how did Emacs ever succeed to work inside screen, then?  AFAIK,
> we never supported this form of TERM's value.

If you discard the ‘screen.’ prefix by explicitly setting TERM in your
.screenrc; for example:

 term xterm-256color

it makes no difference, i.e. colours are still broken (when COLORTERM
is set to ‘truecolour’).

> Is this something relatively new?

I started using screen in 2011 and I'm pretty sure it was prepending
‘.screen’ then.

I'm not convinced this is the issue.  Remember, the colours were fine
under screen in Emacs 27.2.  There's something in the truecolor
support added in Emacs 28.1, specifically the respect paid to the
vaule of COLORTERM, that doesn't agree with screen.


It seems truecolor support was added to screen in July 2015:

 https://git.savannah.gnu.org/cgit/screen.git/log/?qt=grep&q=truecolor

Debian bullseye ships screen 4.8.0 which, according to:

 https://git.savannah.gnu.org/cgit/screen.git/

was released in 2000 which would suggest my screen does supprt
truecolor.  Oddly, my screen(1) manpage makes no mention of truecolor
support, yet various online manpages, for example:

 https://www.man7.org/linux/man-pages/man1/screen.1.html

document a ‘truecolor on|off’ configuraion option:

 truecolor [on|off]

 Enables truecolor support. Currently autodetection of truecolor
 support cannot be done reliably, as such it's left to user to
 enable. Default is off.  Known terminals that may support it are:
 iTerm2, Konsole, st.  Xterm includes support for truecolor escapes
 but converts them back to indexed 256 color space.

I've added the line:

 truecolor on

to my .screenrc and it doesn't barf, but it makes no diffference
either.  I shall investigate further.





  parent reply	other threads:[~2023-03-18 10:34 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
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 [this message]
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=87leju4acd.fsf@sebyte.me \
    --to=sdt@sebyte.me \
    --cc=62237@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=rpluim@gmail.com \
    /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).