Re: how to specify notmuch colors in emacs24
authorAustin Clements <amdragon@MIT.EDU>
Thu, 6 Mar 2014 14:27:30 +0000 (09:27 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:00:24 +0000 (10:00 -0800)
bc/3f8efc0f85525f1593fc4f6d2bdacb7993518e [new file with mode: 0644]

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