From e761b4c4e07e2f0fe03895fba67a84ee3b32029e Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Fri, 7 Mar 2014 09:27:30 +1900 Subject: [PATCH] Re: how to specify notmuch colors in emacs24 --- bc/3f8efc0f85525f1593fc4f6d2bdacb7993518e | 123 ++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 bc/3f8efc0f85525f1593fc4f6d2bdacb7993518e diff --git a/bc/3f8efc0f85525f1593fc4f6d2bdacb7993518e b/bc/3f8efc0f85525f1593fc4f6d2bdacb7993518e new file mode 100644 index 000000000..c226a9866 --- /dev/null +++ b/bc/3f8efc0f85525f1593fc4f6d2bdacb7993518e @@ -0,0 +1,123 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 2253E431FAF + for ; Thu, 6 Mar 2014 06:27:42 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id XzhZOlk54hck for ; + Thu, 6 Mar 2014 06:27:37 -0800 (PST) +Received: from dmz-mailsec-scanner-6.mit.edu (dmz-mailsec-scanner-6.mit.edu + [18.7.68.35]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id F0AB8431FAE + for ; Thu, 6 Mar 2014 06:27:36 -0800 (PST) +X-AuditID: 12074423-f79726d000000cc9-ec-531885d74429 +Received: from mailhub-auth-2.mit.edu ( [18.7.62.36]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP + id 60.3C.03273.7D588135; Thu, 6 Mar 2014 09:27:35 -0500 (EST) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id s26ERXWY022282; + Thu, 6 Mar 2014 09:27:34 -0500 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s26ERVEh015104 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Thu, 6 Mar 2014 09:27:32 -0500 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1WLZGk-0001MJ-PJ; Thu, 06 Mar 2014 09:27:30 -0500 +Date: Thu, 6 Mar 2014 09:27:30 -0500 +From: Austin Clements +To: David Belohrad +Subject: Re: how to specify notmuch colors in emacs24 +Message-ID: <20140306142730.GH4709@mit.edu> +References: +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT0b3eKhFssLRPxmJlbwu7xfWbM5kd + mDw6O0I9nq26xRzAFMVlk5Kak1mWWqRvl8CV8XHTP+aCjQIV77fOYm9gnMXTxcjJISFgItGy + 8w4LhC0mceHeerYuRi4OIYHZTBLPGyeyQjgbGCWmvu9mhHBOMUk83PaWBcJZwijxoOEtWD+L + gIrEj6Pt7CA2m4CGxLb9yxlBbBEBNYkJvQ/AapgFpCW+/W5mArGFBUwlbh9bDFbPK6At8XXi + MlYQW0hAX+LvxtnMEHFBiZMzn0D1aknc+PcSqJcDbM7yfxwgYU4BA4n+6YvYQGxRoBOmnNzG + NoFRaBaS7llIumchdC9gZF7FKJuSW6Wbm5iZU5yarFucnJiXl1qka6aXm1mil5pSuokRHNYu + yjsY/xxUOsQowMGoxMO7wU88WIg1say4MvcQoyQHk5Iob3aLRLAQX1J+SmVGYnFGfFFpTmrx + IUYJDmYlEV7ZaqAcb0piZVVqUT5MSpqDRUmct9biV5CQQHpiSWp2ampBahFMVoaDQ0mCVwsY + v0KCRanpqRVpmTklCGkmDk6Q4TxAw81AaniLCxJzizPTIfKnGBWlxHm5QC4SAElklObB9cLS + zitGcaBXhHltQNp5gCkLrvsV0GAmoMHRfOIgg0sSEVJSDYx6HCKahaFrju++paKwtPLMweCL + c2sY/nbPKT63NqDaRYRj0ie9kKAcoxTWdJutIfz/lr16uFUh70uAh6PoyivvXipvC3Gdfe/Y + N8mcNZ+9pgr3S23csuKQa8mH4NK9chPfO69f9Fo/xjjb5pJCR/cCmU2P1t3yfcIsZtYv9eaq + 2pn1D1gNgi8qsRRnJBpqMRcVJwIA+QiDNBYDAAA= +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 06 Mar 2014 14:27:44 -0000 + +Quoth David Belohrad on Mar 06 at 2:24 pm: +> Dear All, +> +> so far I'm changing some color faces programmatically: +> +> (setq notmuch-search-line-faces '(("deleted" . (:foreground "red" +> :background "blue")) +> ("unread" . (:foreground "DeepSkyBlue")) +> ("flagged" . (:foreground "firebrick1")) +> )) +> +> +> I recently upgraded to emacs24. I was using default shipped tango-dark +> theme. Then (because of VHDL mode I'm using) I have created a custom +> theme, and I'd like to 'backport' the piece of code above into the +> custom theme so it is in accordance with the philosophy of themes. +> +> I have no idea how to specify it using the 'class approach',as e.g. +> +> `(gnus-group-news-1 ((,class (:foreground ,plum-1)))) +> `(gnus-group-news-1-low ((,class (:foreground ,plum-2)))) +> +> Any hint would be greatly appreciated + +I'm not sure what the values of `class', `plum-1', and `plum-2' are in +your above snippet or what the context of that snippet is, so I may be +misunderstanding your problem, but it may help to know that +`gnus-group-news-1' and `notmuch-search-line-faces' are very different +types of variables. + +The value of `gnus-group-news-1' is a face; something like +(:foreground "plum1"). It looks like what you've written above is +actually a "face specification", which uses a bunch of conditions (the +,class part) to determine which of several potential faces to assign +to the variable (though you listed only one face for each variable, so +I'm not sure why you have a condition). It's unfortunate that Emacs +distinguishes faces and face specification, but that's how it is. + +`notmuch-search-line-faces' is *not* a face variable like +`gnus-group-news-1'. It's an association list that maps tags to +faces. As such, it won't work if your theme is trying to treat it +like a face variable, since its value is not a face, but rather a data +structure that has faces in it. -- 2.26.2