From: Eli Zaretskii <eliz@gnu.org>
To: "Francesco Potortì" <pot@gnu.org>
Cc: 64740@debbugs.gnu.org
Subject: bug#64740: 28.2; screen interacts badly with TERMCOLOR=truecolor
Date: Thu, 20 Jul 2023 13:19:25 +0300 [thread overview]
Message-ID: <83v8ee3mxe.fsf@gnu.org> (raw)
In-Reply-To: <87pm4ndnk0.fsf@tucano.isti.cnr.it> (message from Francesco Potortì on Thu, 20 Jul 2023 09:55:43 +0200)
> From: Francesco Potortì <pot@gnu.org>
> Date: Thu, 20 Jul 2023 09:55:43 +0200
>
> emacs -nw -Q behaves strangely under Screen when COLORTERM=truecolor
>
> If I unset COLORTERM the problem goes away
>
> The problem does not happen outside of Screen.
>
> The problem is that Emacs starts as if it could not use the terminal's reverse capability, that is, the mode line is made of hyphens rather than filled characters. Also, all text is dimmed. Moreover, the text stays dimmed in the shell after exiting Emacs.
>
> I do not know if this is an Emacs problem, a Screen problem or else, and unfortunately at the moment I have no time to dig deeper, hope someone else can.
It's a Screen problem, see etc/PROBLEMS and bug#62237. Since you only
have Emacs 28, I reproduce the PROBLEMS entry below:
** Colors are not available or messed up on TTY frames inside 'screen'.
This can happen if you have COLORTERM=truecolor defined in the
environment when Emacs starts, but your version of 'screen' doesn't
actually support 24-bit true colors.
The COLORTERM environment variable is supposed to be set to the value
"truecolor" only if the terminal used by Emacs actually supports true
color. Emacs does not have any means of verifying that this support
is available, it takes the fact that the variable is defined to this
value as an indication that true color support is, in fact, available,
and uses color setting commands that COLORTERM=truecolor presumes,
bypassing the usual Terminfo capabilities related to colors.
Some text-mode terminals, such as GNOME Terminal, are known to set
this environment variable, supposedly to announce their own support
for true color; however the setting is then inherited by any other
terminal emulators started from such a terminal, even though those
other terminal emulators might not themselves support true color using
the same commands as Emacs uses when it sees COLORTERM=truecolor.
The solution is to either upgrade to a newer version of 'screen'
(version 5.x or later reportedly supports true color), or to unset the
COLORTERM variable before starting 'screen', and let Emacs use the
color support provided by the terminal emulator as defined in the
Terminfo database.
next prev parent reply other threads:[~2023-07-20 10:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 7:55 bug#64740: 28.2; screen interacts badly with TERMCOLOR=truecolor Francesco Potortì
2023-07-20 10:19 ` Eli Zaretskii [this message]
2023-07-20 11:04 ` Francesco Potortì
2023-07-20 12:55 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83v8ee3mxe.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=64740@debbugs.gnu.org \
--cc=pot@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.