From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.pretest.bugs,gmane.emacs.devel Subject: Re: Font-lock.el uses strange value for min-colors (Was x-display-color-cells returns wrong number) Date: Sun, 29 Feb 2004 20:27:56 +0100 Sender: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Message-ID: <60951CF7-6AED-11D8-8672-00039363E640@swipnet.se> References: <14AB9AB8-6A0E-11D8-99DB-00039363E640@swipnet.se> <2914-Sun29Feb2004201424+0200-eliz@elta.co.il> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v612) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1078083076 8261 80.91.224.253 (29 Feb 2004 19:31:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Feb 2004 19:31:16 +0000 (UTC) Cc: harder@ifa.au.dk, emacs-devel@gnu.org, emacs-pretest-bug@gnu.org Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Sun Feb 29 20:31:08 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AxWeZ-0001qw-00 for ; Sun, 29 Feb 2004 20:31:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AxWeR-0000wW-7V for gebp-emacs-pretest-bug@gmane.org; Sun, 29 Feb 2004 14:30:59 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AxWeA-0000vg-UR for emacs-pretest-bug@gnu.org; Sun, 29 Feb 2004 14:30:42 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AxWdd-0000ke-8L for emacs-pretest-bug@gnu.org; Sun, 29 Feb 2004 14:30:40 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1AxWd5-0000Pw-HJ; Sun, 29 Feb 2004 14:29:35 -0500 Original-Received: from [213.115.192.53] (helo=mail2.norrnet.net) by mx20.gnu.org with esmtp (Exim 4.30) id 1AxWcN-0001Bm-Rv; Sun, 29 Feb 2004 14:28:52 -0500 Original-Received: from stubby.bodenonline.com (stubby.bodenonline.com [193.201.16.94]) by mail2.norrnet.net (BorderWare MXtreme Mail Firewall) with ESMTP id 13F396B5A3; Sun, 29 Feb 2004 20:28:47 +0100 (CET) Original-Received: from accessno42.bodenonline.com (accessno42.bodenonline.com [193.201.16.44]) by stubby.bodenonline.com (8.12.1/8.12.1) with ESMTP id i1TKJR2R024738; Sun, 29 Feb 2004 21:19:29 +0100 In-Reply-To: <2914-Sun29Feb2004201424+0200-eliz@elta.co.il> Original-To: Eli Zaretskii X-Mailer: Apple Mail (2.612) X-BeenThere: emacs-pretest-bug@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.pretest.bugs:2245 gmane.emacs.devel:20201 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20201 > However, this sounds like a tip of an iceberg: are you saying that > list-display-colors will display a list whose length has no simple > relation to what display-color-cells returns? That sounds bad, > doesn't it? Bad or not, it is the case. An X server is free to use just about any value for DisplayCells, it is just the number of cells you get by default when creating a colormap. In this case, Jesper Harder has 16 planes, but just 64 color cells. So he can actually display 65536 colors, not 64. However, he also has a TrueColor visual, so Emacs should see this and ignore DisplayCells, I don't know why it doesn't. I see that list-colors-display has code to ignore DisplayCells for TrueColor visuals. It is actually uncommon for any X server to return more than 256 for DisplayCells, presumably to save memory if a lot of colormaps are allocated. A better way to find out the number of colors that can be displayed at the same time is (1 << DisplayPlanes(...)). There is no need to distinguish between visual types if number of colors is calculated this way. Jan D.