From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#6332: Colors lost from list-colors-display Date: Fri, 04 Jun 2010 12:07:34 -0400 Message-ID: <87aaralr21.fsf@stupidchicken.com> References: <871vcpuwls.fsf@mail.jurta.org> <87pr07ev04.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1275669879 31287 80.91.229.12 (4 Jun 2010 16:44:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Jun 2010 16:44:39 +0000 (UTC) Cc: 6332@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 04 18:44:36 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OKa0B-00082t-IH for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Jun 2010 18:44:35 +0200 Original-Received: from localhost ([127.0.0.1]:39000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKa05-0003SD-3x for geb-bug-gnu-emacs@m.gmane.org; Fri, 04 Jun 2010 12:44:05 -0400 Original-Received: from [140.186.70.92] (port=40191 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OKZki-0002KX-8A for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2010 12:28:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OKZkg-0001KG-JU for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2010 12:28:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54330) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKZkg-0001KC-HN for bug-gnu-emacs@gnu.org; Fri, 04 Jun 2010 12:28:10 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OKZRC-0002M3-Go; Fri, 04 Jun 2010 12:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Jun 2010 16:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6332 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6332-submit@debbugs.gnu.org id=B6332.12756676639044 (code B ref 6332); Fri, 04 Jun 2010 16:08:02 +0000 Original-Received: (at 6332) by debbugs.gnu.org; 4 Jun 2010 16:07:43 +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 1OKZQs-0002Lp-QB for submit@debbugs.gnu.org; Fri, 04 Jun 2010 12:07:43 -0400 Original-Received: from pantheon-po16.its.yale.edu ([130.132.50.72]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OKZQp-0002Lk-TU for 6332@debbugs.gnu.org; Fri, 04 Jun 2010 12:07:40 -0400 Original-Received: from furry (dhcp128036014059.central.yale.edu [128.36.14.59]) (authenticated bits=0) by pantheon-po16.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o54G7YQU000635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 4 Jun 2010 12:07:34 -0400 Original-Received: by furry (Postfix, from userid 1000) id 4A3AA16D427; Fri, 4 Jun 2010 12:07:34 -0400 (EDT) In-Reply-To: <87pr07ev04.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 03 Jun 2010 22:31:55 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 04 Jun 2010 12:08:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37541 Archived-At: Juri Linkov writes: > The comment added 2008-05-10 (revno#87519) says that the ordering of the > colors is chosen for the user's convenience in `list-colors-display'. > > But later at 2009-08-05 I provided a patch that adds a new option > `list-colors-sort' that defines the sorting order for `list-colors-display': > http://thread.gmane.org/gmane.emacs.devel/113422/focus=113687 > > I propose to revert 2008-05-10 change, so `x-colors' will be again the > complete copy of etc/rgb.txt. And to install my patch that implements the > current sorting order in `x-colors' as the default value of the new option > `list-colors-sort'. Please don't revert the 2008-05-10 change. The current order is quite deliberate, as the comment in common-win.el makes clear: ;; The ordering of the colors is chosen for the user's convenience in ;; `list-colors-display', which displays the reverse of this list. ;; Roughly speaking, `list-colors-display' orders by (i) named shades ;; of grey with hue 0.0, sorted by value (ii) named colors with ;; saturation 1.0, sorted by hue, (iii) named non-white colors with ;; saturation less than 1.0, sorted by hue, (iv) other named shades of ;; white, (v) numbered colors sorted by hue, and (vi) numbered shades ;; of grey. I have experimented with pure HSV ordering, and the results were unsatisfactory, as it breaks apart groups of clearly-related color names (e.g. purple[1-4]). I don't object to adding an option that controls how the colors are sorted. However, the default must be a human-specified ordering, since there is never any satisfactory way to map a multi-dimensional space into one dimension. It should be noted that while only the colors listed in `x-colors' are displayed by list-colors-display, Emacs recognizes any color in rgb.txt. So even if "dark green" is not in x-colors, setting a face color to "dark green" still works. Some of the colors in rgb.txt have duplicate names, and I think are rightly omitted from x-colors. For instance, there is no need for us to list "grey99" and "gray99" separately. Dark green itself, however, was inadvertently omitted. I will add it back (along with some other ommitted colors).