0

In .screenrc, I have this line: term xterm-256color If I do not use that, or if I try something different (like xterm-color or screen-256color), then emacs has absolutely no color.

Here is a font-lock setting in emacs outside screen, displaying everything correctly.

enter image description here

And here are those same settings while inside screen.

enter image description here

The settings for the comment, doc, and preprocessor faces are forced to be inverted background/foreground despite what the settings state.

Here is an example of the atrocious highlighting in action:

enter image description here

How do I fix the colors? Should I cross-post to StackOverflow or Unix StackExchange instead?

3
  • What is the value of the TERM environment variable? It should be something like xterm-256color. Commented Mar 10, 2023 at 8:55
  • @Lindydancer The value of TERM both outside and inside screen is set to xterm-256color. I confirmed both by using echo $TERM. Commented Mar 10, 2023 at 13:17
  • Things to try: force screen to use your chosen screenrc with screen -c myscreenrc. force screen to use your chosen term with screen -T xterm-256color. This is really an issue w/ screen's handling of termcap/terminfo. You could work around it by redefining all your colors in emacs, or learning termcap/terminfo and customizing your term setting in your screenrc (man screen, search for "termcapinfo"). I recommend neither. give byobu or tmux a try. this mess is exactally why i personally switched to tmux Commented Mar 10, 2023 at 15:00

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.