unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
To: 34606@debbugs.gnu.org
Subject: bug#34606: Emacs colors are off in screen sessions
Date: Thu, 21 Feb 2019 09:56:18 -0500	[thread overview]
Message-ID: <863a6869-ee18-f49d-68e3-2a1d86c648ed@gmail.com> (raw)

Hi all,

I'm having issues with color selection and syntax highlighting in Emacs running in screen.
I'm comparing the appearance of `emacs -nw -Q` on GNU / Linux Mint 18.3 (based on Ubuntu 16.04).

In a newly created gnome-terminal window (TERM=xterm-256color), I get orange comments in *scratch*.
In a newly created screen (TERM=screen), I get pale yellow comments in *scratch*.  If I change TERM to either xterm-256color or screen-256color, I get the expected orange text.

If I install the ncurses-term package, I get the same colors in gnome-terminal, but in a newly created screen TERM becomes screen.xterm-256color and I get red comments in *scratch*.  If I change TERM to xterm-256color nothing changes, and if I change TERM to screen-256color I get the expected orange text (may be relevant: https://emacs.stackexchange.com/questions/20545/emacs-colors-being-set-differently-when-term-is-screen-256color-and-xterm-256)

Is this all as expected?  Why does changing to xterm-256color yield different results with or without ncurses-term?  If I understand correctly, the reason why TERM changes after I install ncurses-term is that this package provides the screen.xterm-256color termcap entry, and then screen acts as documented:

       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" (…)

Is there anything that Emacs could do differently to make things smoother?  In particular, could TERM=screen.xterm-256color behave the same as TERM=screen-256color?

Thanks,
Clément.








             reply	other threads:[~2019-02-21 14:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 14:56 Clément Pit-Claudel [this message]
2019-02-21 15:20 ` bug#34606: Emacs colors are off in screen sessions Eli Zaretskii
2019-02-21 16:37   ` Clément Pit-Claudel
2019-02-21 19:21     ` Eli Zaretskii
2019-02-21 22:06       ` Clément Pit-Claudel
2019-02-22  7:14         ` Eli Zaretskii
2019-07-03  2:31 ` Stefan Kangas

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=863a6869-ee18-f49d-68e3-2a1d86c648ed@gmail.com \
    --to=cpitclaudel@gmail.com \
    --cc=34606@debbugs.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 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).