* bug#48755: 28.0.50; Emacs doesn't detect the terminal background color in macOS Terminal or iTerm2
[not found] <m1eednkgng.fsf.ref@yahoo.es>
@ 2021-05-30 22:20 ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-31 12:02 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-05-30 22:20 UTC (permalink / raw)
To: 48755
Steps to reproduce the problem:
- Start macOS Terminal or iTerm2 (both are probably the most popular
terminals for macOS).
- Switch the terminal background color to a dark color.
- emacs -nw -Q
Actual result:
Colored text is sometimes very difficult to read, because Emacs assumes
it's running on a light terminal background, and configures the faces
accordingly.
Expected result:
Emacs faces are those of a dark background.
Workaround:
Customize frame-background-mode to 'dark.
Here's some information about macOS Terminal and iTerm2. Apparently,
they both identify as xterm-256color and support querying the background
color:
macOS Terminal:
$ printf '\e[>0c'
1;95;0c
$ printf '\e]11;?\e\'
11;rgb:0000/0000/0000
$ echo $TERM
xterm-256color
iTerm2:
$ printf '\e[>0c'
0;95;0c
$ printf '\e]11;?\e\'
11;rgb:0000/0000/0000
$ echo $TERM
xterm-256color
I tried to fix the problem by taking a look at xterm--version-handler in
xterm.el, but the version logic is a bit difficult to understand. Is
there some documentation about the versions and capabilities somewhere?
I'm worried about changing things there may cause regressions in other
terminals.
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-31 12:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <m1eednkgng.fsf.ref@yahoo.es>
2021-05-30 22:20 ` bug#48755: 28.0.50; Emacs doesn't detect the terminal background color in macOS Terminal or iTerm2 Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-31 12:02 ` Eli Zaretskii
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).