From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bill Wohler Newsgroups: gmane.mail.mh-e.devel,gmane.emacs.devel Subject: Re: Why min-colors 88? Date: Sat, 04 Feb 2006 22:18:38 -0800 Organization: Newt Software Message-ID: <87wtgapbup.fsf@olgas.newt.com> References: <851.1138996246@olgas.newt.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139120595 3736 80.91.229.2 (5 Feb 2006 06:23:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Feb 2006 06:23:15 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: mh-e-devel-admin@lists.sourceforge.net Sun Feb 05 07:23:12 2006 Return-path: Envelope-to: gmmd-mh-e-devel@m.gmane.org Original-Received: from lists-outbound.sourceforge.net ([66.35.250.225]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F5dIi-0006dn-62 for gmmd-mh-e-devel@m.gmane.org; Sun, 05 Feb 2006 07:23:08 +0100 Original-Received: from sc8-sf-list1-b.sourceforge.net (sc8-sf-list1-b.sourceforge.net [10.3.1.7]) by sc8-sf-spam1.sourceforge.net (Postfix) with ESMTP id A7561885EC; Sat, 4 Feb 2006 22:22:01 -0800 (PST) Original-Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.92] helo=mail.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1F5dHH-0006DC-Ds for mh-e-devel@lists.sourceforge.net; Sat, 04 Feb 2006 22:21:39 -0800 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1F5dHF-0000Uy-Nx for mh-e-devel@lists.sourceforge.net; Sat, 04 Feb 2006 22:21:39 -0800 Original-Received: from root by ciao.gmane.org with local (Exim 4.43) id 1F5dH7-0006OV-9X for mh-e-devel@lists.sourceforge.net; Sun, 05 Feb 2006 07:21:29 +0100 Original-Received: from h-68-166-37-175.snvacaid.dynamic.covad.net ([68.166.37.175]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Feb 2006 07:21:29 +0100 Original-Received: from wohler by h-68-166-37-175.snvacaid.dynamic.covad.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 05 Feb 2006 07:21:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: mh-e-devel@lists.sourceforge.net Original-Lines: 72 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: h-68-166-37-175.snvacaid.dynamic.covad.net User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:RSJ+S9Vulhjbhamc0YWjPhFf+g8= X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by sourceforge.net. See http://spamassassin.org/tag/ for more details. Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001 Original-Sender: mh-e-devel-admin@lists.sourceforge.net Errors-To: mh-e-devel-admin@lists.sourceforge.net X-BeenThere: mh-e-devel@lists.sourceforge.net X-Mailman-Version: 2.0.9-sf.net Precedence: bulk List-Unsubscribe: , List-Id: Forum for the MH-E developers List-Post: List-Help: List-Subscribe: , List-Archive: X-Original-Date: Sat, 04 Feb 2006 22:18:38 -0800 Xref: news.gmane.org gmane.mail.mh-e.devel:11576 gmane.emacs.devel:50034 Archived-At: Eli Zaretskii writes: >> Date: Fri, 03 Feb 2006 11:50:46 -0800 >> From: Bill Wohler >> >> Can anyone explain the magic number 88 to me? Why is this used >> throughout Emacs? Why is this the default generated when >> customizing a face (on devices with lots of colors)? > > Because there's an 88-color xterm whose color set is rich enough to > support all the colors we use in Emacs' faces. Or in other words, Emacs' has 88 faces? >> An MH-E developer has a device where (device-color-cells) returns 64. > > Out of curiosity, what device is that? Eric? > In any case, there's no support in Emacs for such devices right now, > i.e. there's no 64-color set that can be used to map the face colors > using the tty-colors.el machinery. So I wonder how does that > developer use his/her device with Emacs. > >> What harm could there be in changing our specifications to use 64 >> instead of 88? > > I don't know. To find out, someone will have to: > > . find out what colors, in terms of RGB values, are defined on that > device > . map the colors used by Emacs (e.g. in color-name-rgb-alist) into > those 64 colors, using tty-color-translate > . see how many Emacs colors map to the same color on the 64-color > deives, and > . draw the conclusions. Objectively, if the colors that we use do not map to the same color, we should be OK, right? Subjectively, the MH-E colors should map to a pleasing set. >> Finally, why are there a lot of faces with seemingly redundant >> specifications such as this? >> >> (defface highlight >> '((((class color) (min-colors 88) (background light)) >> :background "darkseagreen2") >> (((class color) (min-colors 88) (background dark)) >> :background "darkolivegreen") >> (((class color) (min-colors 16) (background light)) >> :background "darkseagreen2") >> (((class color) (min-colors 16) (background dark)) >> :background "darkolivegreen") >> (((class color) (min-colors 8)) >> :background "green" :foreground "black") >> (t :inverse-video t)) >> "Basic face for highlighting." >> :group 'basic-faces) > > The main reason is to allow an easy modification of the defaults for > 88-and-up color terminals in the future. The 88-color support is new > with Emacs 22, so for now, we just duplicated the old definitions. We > expect them to change as user experience is gained when Emacs 22 is > released. Thanks, Eli. -- Bill Wohler http://www.newt.com/wohler/ GnuPG ID:610BD9AD Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian! If you're passed on the right, you're in the wrong lane. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642