emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xterm-256color and face colors


From: Giorgos Keramidas
Subject: xterm-256color and face colors
Date: Sun, 13 Dec 2009 01:24:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (berkeley-unix)

Hi all,

The version of Emacs I am currently running is ``GNU Emacs 23.1.90.1
(i386-unknown-freebsd9.0, GTK+ Version 2.18.4) of 2009-12-11 on kobe'',
built from a Git snapshot a couple of days ago.

A recent update to FreeBSD synchronized our termcap database entries for
"xterm*" terminals with the one in xterm's source distribution.  This
was the first step towards making Emacs really support more than 8 color
cells in xterm windows under FreeBSD.

Unfortunately this seems to have broken many face-colors that use X11
names in their face attributes.  With the current termcap database of
FreeBSD using a TERM value of "xterm" causes Emacs to fall back to 8
color cells, but most of the faces map into these color cells correctly.
The result is similar to the attached "emacs-23-xterm.png" screenshot,
also available at:

  http://people.freebsd.org/~keramida/emacs-xterm256/emacs-23-xterm.png

Using a TERM value of "xterm-256color", on the other hand, causes Emacs
to have 256 color cells, but font-locking fails to pick up the color
definitions of many font faces, resulting in no color at all for those
faces.  For example the same `M-x ielm' session does not highlight
strings with any color at all.  The result is similar to the attached
"emacs-23-xterm-256color.png" screenshot, also available at:

  http://people.freebsd.org/~keramida/emacs-xterm256/emacs-23-xterm-256color.png

Trying `M-x customize-face RET font-lock-string-face RET' shows that
strings should be using "LightSalmon" as their color, but the sample
text near the color definition uses no color at all.  The screenshot
attached as "emacs-23-xterm-256color-string-face.png" shows this, and is
also available online at:

  
http://people.freebsd.org/~keramida/emacs-xterm256/emacs-23-xterm-256color-string-face.png

The list of face-colors from `M-x list-colors-display' shows 256 colors
when TERM="xterm-256color" but the colors upwards of slot 16 are all
unnamed, as in the attached "emacs-23-xterm-256color-list.png"
screenshot, also available at:

  
http://people.freebsd.org/~keramida/emacs-xterm256/emacs-23-xterm-256color-list.png

I see that `color-name-rgb-alist' is populated with a list of X11 color
names, but these names are not used at all for face colors in xterm
windows that have TERM="xterm-256color".  Any ideas how I can make Emacs
use the already loaded colors from `color-name-rgb-alist' to populate
the 256 available color cells?

Attachment: pgpvL8FB2Fl_K.pgp
Description: PGP signature

Attachment: emacs-23-xterm.png
Description: \"emacs -nw\" with TERM='xterm' and 8 color cells

Attachment: emacs-23-xterm-256color.png
Description: \"emacs -nw\" with TERM='xterm-256color' and 256 color cells

Attachment: emacs-23-xterm-256color-string-face.png
Description: font-lock-string-face customize buffer in \"emacs -nw\" with TERM='xterm-256color' and 256 color cells

Attachment: emacs-23-xterm-256color-list.png
Description: list-colors-display in \"emacs -nw\" with TERM='xterm-256color' and 256 color cells


reply via email to

[Prev in Thread] Current Thread [Next in Thread]