I have GNU Emacs 23 (package emacs23
) installed on an Ubuntu 10.04 desktop machine and package emacs23-nox
installed on an Ubuntu 10.04 headless server (no X installed). Both installations have the same ~/.emacs
file. I run Emacs with -nw
on both computers. I don't have python-mode
installed on either machine as my understanding is that this is included in Emacs 23.
On the desktop machine, comments in Python (starting with #
) are highlighted in red. On the server, comments appear in plain white text like all other non-highlighted text. Any suggestions as to why comments are not being highlighted correctly on the server (nox
) installation?
Update: This appears to be a terminal-related issue. I ssh
into the server machine from terminator
via the screen replacement byobu
. If I run emacs on the server with TERM="xterm-256color" emacs
, then comments are highlighted, but all the other colours look very strange.
Update: Adding `export TERM="xterm-256color" "solved" this. The syntax highlighting now has very strange colours though: purples lilacs and light browns. My green current line highlight bar is now a light pale yellow/green. Comments are highlighted in red though :)
Update: Solved. Setting TERM="xterm-color"
produces "proper" colors, including highlighting of comments. The server was defaulting to a value of "screen-bce" for TERM
which was not highlighting comments.
Update: Unsolved. byobu
provides keybindings for various function keys to easily create new screen sessions and switch between them. When TERM
is set to xterm-color
, these function keys no longer work. So I guess I'll just have to be happy with unhighlighted comments in Python code in Emacs.
ssh
into the server to work on other tasks, as well as edit files, so editing files from the "client" to use the client settings isn't really what I'm looking for. Thanks for the suggestion though; it is something I'll look into more thoroughly. – Sharie