all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Giorgos Keramidas <keramida@ceid.upatras.gr>
To: emacs-devel@gnu.org
Subject: xterm-256color and face colors
Date: Sun, 13 Dec 2009 01:24:11 +0200	[thread overview]
Message-ID: <87638bai90.fsf@kobe.laptop> (raw)


[-- 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 --]

             reply	other threads:[~2009-12-12 23:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-12 23:24 Giorgos Keramidas [this message]
2009-12-13  2:51 ` xterm-256color and face colors Dan Nicolaescu
2009-12-13  3:18   ` Giorgos Keramidas
2009-12-13  4:02     ` Giorgos Keramidas

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87638bai90.fsf@kobe.laptop \
    --to=keramida@ceid.upatras.gr \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.