unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* xterm-256color and face colors
@ 2009-12-12 23:24 Giorgos Keramidas
  2009-12-13  2:51 ` Dan Nicolaescu
  0 siblings, 1 reply; 4+ messages in thread
From: Giorgos Keramidas @ 2009-12-12 23:24 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 2432 bytes --]

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 #1.2: Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: \"emacs -nw\" with TERM='xterm' and 8 color cells --]
[-- Type: image/png, Size: 6611 bytes --]

[-- Attachment #3: \"emacs -nw\" with TERM='xterm-256color' and 256 color cells --]
[-- Type: image/png, Size: 6250 bytes --]

[-- Attachment #4: font-lock-string-face customize buffer in \"emacs -nw\" with TERM='xterm-256color' and 256 color cells --]
[-- Type: image/png, Size: 13618 bytes --]

[-- Attachment #5: list-colors-display in \"emacs -nw\" with TERM='xterm-256color' and 256 color cells --]
[-- Type: image/png, Size: 17307 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-12-13  4:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-12 23:24 xterm-256color and face colors Giorgos Keramidas
2009-12-13  2:51 ` Dan Nicolaescu
2009-12-13  3:18   ` Giorgos Keramidas
2009-12-13  4:02     ` Giorgos Keramidas

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).