From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#9402: list-colors-display Date: Tue, 30 Aug 2011 07:41:51 -0400 Message-ID: References: <87obz83v0x.fsf@mail.jurta.org> <838vqcf086.fsf@gnu.org> <8739gjzzm1.fsf@mail.jurta.org> <4E5C77CE.3000203@swipnet.se> <87hb4zp8mc.fsf@mail.jurta.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1314704524 28738 80.91.229.12 (30 Aug 2011 11:42:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 30 Aug 2011 11:42:04 +0000 (UTC) Cc: 9402@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 30 13:42:00 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QyMhb-0005Jm-M8 for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Aug 2011 13:41:59 +0200 Original-Received: from localhost ([::1]:59695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyMhb-0006cr-6q for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Aug 2011 07:41:59 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyMhZ-0006cm-AF for bug-gnu-emacs@gnu.org; Tue, 30 Aug 2011 07:41:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QyMhY-0000OH-26 for bug-gnu-emacs@gnu.org; Tue, 30 Aug 2011 07:41:57 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56887) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyMhX-0000OD-VY for bug-gnu-emacs@gnu.org; Tue, 30 Aug 2011 07:41:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QyMkY-0007dB-MX; Tue, 30 Aug 2011 07:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Aug 2011 11:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9402 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9402-submit@debbugs.gnu.org id=B9402.131470470129322 (code B ref 9402); Tue, 30 Aug 2011 11:45:02 +0000 Original-Received: (at 9402) by debbugs.gnu.org; 30 Aug 2011 11:45:01 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QyMkW-0007cl-OL for submit@debbugs.gnu.org; Tue, 30 Aug 2011 07:45:01 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QyMkU-0007cf-W1 for 9402@debbugs.gnu.org; Tue, 30 Aug 2011 07:44:59 -0400 Original-Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1QyMhT-0001vc-Qw; Tue, 30 Aug 2011 07:41:51 -0400 In-reply-to: <87hb4zp8mc.fsf@mail.jurta.org> (message from Juri Linkov on Tue, 30 Aug 2011 12:10:51 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 30 Aug 2011 07:45:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:50430 Archived-At: > From: Juri Linkov > Cc: Eli Zaretskii , 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.