From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.devel Subject: Re: Inclusion of naquadah-theme Date: Mon, 02 Jul 2012 23:02:02 +0200 Message-ID: <874nppubat.fsf@keller.adm.naquadah.org> References: <87pq8nk8cj.fsf@zelenka.enovance.com> <87bok7zekq.fsf@gnu.org> <87k3yujqmn.fsf@zelenka.enovance.com> <87sjdf28ik.fsf@gnu.org> <874npvk990.fsf@zelenka.enovance.com> <874nptk0jo.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1341262940 3874 80.91.229.3 (2 Jul 2012 21:02:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 2 Jul 2012 21:02:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 02 23:02:20 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Slnl8-0004vm-Fc for ged-emacs-devel@m.gmane.org; Mon, 02 Jul 2012 23:02:14 +0200 Original-Received: from localhost ([::1]:56991 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Slnl7-0007W9-DR for ged-emacs-devel@m.gmane.org; Mon, 02 Jul 2012 17:02:13 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Slnl4-0007Vi-PB for emacs-devel@gnu.org; Mon, 02 Jul 2012 17:02:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Slnl2-0002Fd-TZ for emacs-devel@gnu.org; Mon, 02 Jul 2012 17:02:10 -0400 Original-Received: from prometheus.naquadah.org ([212.85.154.174]:53350 helo=mx1.naquadah.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Slnkz-0002EW-Qp; Mon, 02 Jul 2012 17:02:05 -0400 Original-Received: from keller.adm.naquadah.org (unknown [IPv6:2a01:e34:ec03:2920:21f:16ff:fe0c:8d60]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.naquadah.org (Postfix) with ESMTPSA id 2F4B95C1DA; Mon, 2 Jul 2012 23:02:03 +0200 (CEST) Mail-Followup-To: Chong Yidong , emacs-devel@gnu.org In-Reply-To: <874nptk0jo.fsf@gnu.org> (Chong Yidong's message of "Sat, 30 Jun 2012 10:15:23 +0800") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 212.85.154.174 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:151378 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, Jun 30 2012, Chong Yidong wrote: > Well, first of all there are really only two cases that need to be > handled: terminals that can handle #rrggbb, and 16-color terminals. In > my experience, 256-color xterms give a rather good approximation of the > desired colors automatically, without manual color placement. Clearly that fails with naquadah-theme. I wish I had more time to try to fix this. > As for matching color names to faces, the approach that we've used in > tango-theme.el and others is to do something like this: > > (let ((class '((class color) (min-colors 89))) > ;; Tango palette colors. > (butter-1 "#fce94f") > ...) > > (custom-theme-set-faces > 'tango-dark > ... > `(cursor ((,class (:background ,butter-1)))) > > Apart from handling multiple terminals, naquadah-simple-face-to-multiple > aims to do the same thing, right?=20 Yes, that's exactly what we're doing. > I'm guessing the reason is that you feel that having explicit > functions is more structured/less ad-hoc than the above let-form. Not, that's because I ignored the syntax you used in tango actually. > If that's the case, maybe the solution is to add a new macro to > custom.el, which does something like this: > > (custom-theme-set-faces-with-color-names THEME TERMINALS COLORS FACES...) > > (custom-theme-set-faces-with-color-names > 'tango-dark > ((term-1 ((class color) (min-colors 4096))) > (term-2 ((class color) (min-colors 16)))) > ((butter (term-1 "#fce94f") (term-2 "yellow"))) > (cursor :background butter) > ...) > > WDYT? That would be really handy, indeed. Do you propose to do the patch yourself, or should it? =2D-=20 /* Julien Danjou =E2=95=AD Free Software hacker & freelance =E2=95=B0 http://julien.danjou.info */ --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJP8gxKAAoJEGEbqVCLeKXCgtEP/ipzhf8wPzTkrhpoqtKRzp2r a19N722GHhjbmaJNnU/ONSsj+ifzXWI8p6nhHtqUfFRFdGtFRRXQ2T04yXyyr1VX VanNE3QzjB512uysmI1R+SG5XahvhSlAHRlKs4Tjn+e3kavLzIjDHldteXXUI/JN aYX3YL844Nd7WeuM/ax7uT6/erJfcmMoiw68pXorLEfkgCAJ2PL/PtHpDX85xMjT zNG89SJkzTOHUqBulzNVHiwMirH02jEh6k9wYVnDOWfu0mvMrJdIx0C9YECc21on bzEEWnfgk/Lzw2QPBVttGQ7uc+v6DIBeUY8reqV/h421qHUNzF0E2NU5RKaTRalA 27/0vt8uaf0iGGH8Px2huPp1K0FE0hX0LGJH/ZZDDW8pk+SXNiaYUTlQK8UmBeb7 4flk01CCWN67IDsjD7c3zkI75gAdpKSongzX7LF2yrl/ziZYoEiQeWdc091vqBGt 4CaWot94thB0eWqbY2le1vX5TvAi54GSs8fzoBJaHkqqScKKmHxf1g1GJLN4FVsT xYANic78K6LgLGbspncHV/fbNQBQyPUQjYUKKrMjds2n9qAF5oSamNLL30OOyfO2 BT9lNsWJyCKqfIRv94aPyAgELtZe6C0BXtl/r17fr8iIyVpaevjxcQq4BeIaBjlK HspWvDZ8RiWJi3j7DLRH =U2fE -----END PGP SIGNATURE----- --=-=-=--