all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Juri Linkov <juri@jurta.org>
Cc: 9402@debbugs.gnu.org
Subject: bug#9402: list-colors-display
Date: Tue, 30 Aug 2011 07:41:51 -0400	[thread overview]
Message-ID: <E1QyMhT-0001vc-Qw@fencepost.gnu.org> (raw)
In-Reply-To: <87hb4zp8mc.fsf@mail.jurta.org> (message from Juri Linkov on Tue,  30 Aug 2011 12:10:51 +0300)

> From: Juri Linkov <juri@jurta.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,  9402@debbugs.gnu.org
> Date: Tue, 30 Aug 2011 12:10:51 +0300
> 
> What if a user customizes a face on X for min-colors 88 and starts Emacs on
> a tty with 8 colors?

TTY is not a problem: each color goes through color approximation (see
tty-colors.el), so Emacs will choose some available color whose RGB
values are the closest to the one specified.

> Or customizes a face to "color-255" on xterm-256color
> and starts Emacs on X?  Or customizes a face for light background and
> starts Emacs on dark background?  Or customizes a face for bold and starts
> Emacs where bold is not supported?  And so on.

The answer is clear: unsupported attributes and colors are ignored,
the color approximation for TTY mentioned above being the only
exception.

> Of course, graceful degradation to some closer colors could help,
> but the result would not be what the user has customized.

What else can Emacs possibly do?

> To avoid these problems, customize-face should retain the conditional
> part of the face definition when saving the modified face.

This doesn't work in general because most faces don't provide values
for every possible level of support.

>     (((class color) (min-colors 88) (background light) (type gtk))
>      :foreground "gtk_selection_fg_color"
>      :background "gtk_selection_bg_color")

Aha, and then you run this on an older GTK version where
gtk_selection_bg_color isn't supported, then what?

The only way out of this mess that has some future is to expand the
color approximation we have for TTY to all the other display types.
That will at least work as reliably as humanly possible.  Nothing else
will ever work reliably.





  reply	other threads:[~2011-08-30 11:41 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 19:27 bug#9402: list-colors-display Juri Linkov
2011-08-29 20:10 ` Eli Zaretskii
2011-08-29 21:17   ` Juri Linkov
2011-08-30  2:54     ` Eli Zaretskii
2011-08-30  5:40     ` Jan D.
2011-08-30  9:10       ` Juri Linkov
2011-08-30 11:41         ` Eli Zaretskii [this message]
2011-08-30 14:15           ` Andreas Schwab
2011-08-30 17:57             ` Eli Zaretskii
2011-08-30  7:44   ` Eli Zaretskii
2011-08-30 17:46     ` Eli Zaretskii
2011-08-31  9:35       ` Juri Linkov
2011-08-31 10:57         ` Eli Zaretskii
2011-08-31 16:17           ` Chong Yidong
2011-08-31 19:02             ` Jan Djärv
2011-09-01  2:12               ` Chong Yidong
2011-08-31 16:27           ` Juri Linkov
2011-08-31 17:40             ` Eli Zaretskii
2011-08-31 18:35               ` Juri Linkov
2011-08-31 19:22                 ` Jan Djärv
2011-08-31 20:14                   ` Eli Zaretskii
2011-08-31 20:28                     ` Juri Linkov
2011-09-01  2:54                       ` Eli Zaretskii
2011-08-31 21:07                     ` Jan Djärv
2011-09-01  2:56                       ` Eli Zaretskii
2011-09-01  2:15                     ` Chong Yidong
2011-09-01  3:07                       ` Eli Zaretskii
2011-08-31 19:17             ` Jan Djärv
2011-08-31 19:11           ` Jan Djärv
2011-08-31 20:00             ` Eli Zaretskii
2011-08-31 20:10               ` Juri Linkov
2011-09-01  2:50                 ` Eli Zaretskii
2011-09-01  8:36                   ` Juri Linkov
2011-09-01 10:06                     ` Eli Zaretskii
2011-08-31 21:06               ` Jan Djärv
2011-08-31 19:09         ` Jan Djärv

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=E1QyMhT-0001vc-Qw@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=9402@debbugs.gnu.org \
    --cc=juri@jurta.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.