Re: how to specify notmuch colors in emacs24
[notmuch-archives.git] / cd / 35b0705648f528806a0327cd1812a4f4923548
1 Return-Path: <david@belohrad.ch>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 491F1431FBF\r
6         for <notmuch@notmuchmail.org>; Tue, 11 Mar 2014 03:02:38 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id FOn4DNklKU7c for <notmuch@notmuchmail.org>;\r
16         Tue, 11 Mar 2014 03:02:34 -0700 (PDT)\r
17 Received: from server.belohrad.ch (static-212-101-19-163.adsl.solnet.ch\r
18         [212.101.19.163])\r
19         (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 5CD21431FBD\r
22         for <notmuch@notmuchmail.org>; Tue, 11 Mar 2014 03:02:33 -0700 (PDT)\r
23 Received: from beesknees.cern.ch.belohrad.ch (beesknees.cern.ch\r
24         [137.138.197.99])\r
25         (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
26         (No client certificate requested) (Authenticated sender: david)\r
27         by server.belohrad.ch (Postfix) with ESMTPSA id B212C2C014F;\r
28         Tue, 11 Mar 2014 11:04:11 +0100 (CET)\r
29 From: David Belohrad <david@belohrad.ch>\r
30 To: Austin Clements <amdragon@MIT.EDU>\r
31 Subject: Re: how to specify notmuch colors in emacs24\r
32 In-Reply-To: <20140306142730.GH4709@mit.edu>\r
33 References: <uaxy50n1mu4.fsf@beesknees.cern.ch>\r
34  <20140306142730.GH4709@mit.edu>\r
35 User-Agent: Notmuch/0.17+54~g9ac863c (http://notmuchmail.org) Emacs/24.3.50.1\r
36         (x86_64-unknown-linux-gnu)\r
37 Date: Tue, 11 Mar 2014 11:02:13 +0100\r
38 Message-ID: <uaxwqg1xdcq.fsf@beesknees.cern.ch>\r
39 MIME-Version: 1.0\r
40 Content-Type: text/plain\r
41 Cc: notmuch@notmuchmail.org\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Tue, 11 Mar 2014 10:02:38 -0000\r
55 \r
56 Hi All,\r
57 \r
58 thanks for extensive answers on this thread. The plum-1 and other\r
59 definitions are coming from 'tango-dark' theme of emacs 24, which I\r
60 wanted to modify. I understood hence, that the two ways of settings the\r
61 colors (notmuch/emacs24) are so far somehow incompatible and hence there\r
62 is no way how to specify the notmuch colors the emacs24 way.\r
63 \r
64 many thanks\r
65 .d.\r
66 \r
67 \r
68 \r
69 Austin Clements <amdragon@MIT.EDU> writes:\r
70 \r
71 > Quoth David Belohrad on Mar 06 at  2:24 pm:\r
72 >> Dear All,\r
73 >> \r
74 >> so far I'm changing some color faces programmatically:\r
75 >> \r
76 >>   (setq notmuch-search-line-faces '(("deleted" . (:foreground "red"\r
77 >>                                                   :background "blue"))\r
78 >>                                      ("unread" . (:foreground "DeepSkyBlue"))\r
79 >>                                      ("flagged" . (:foreground "firebrick1"))\r
80 >>                                      ))\r
81 >> \r
82 >> \r
83 >> I recently upgraded to emacs24. I was using default shipped tango-dark\r
84 >> theme. Then (because of VHDL mode I'm using) I have created a custom\r
85 >> theme, and I'd like to 'backport' the piece of code above into the\r
86 >> custom theme so it is in accordance with the philosophy of themes.\r
87 >> \r
88 >> I have no idea how to specify it using the 'class approach',as e.g.\r
89 >> \r
90 >>    `(gnus-group-news-1 ((,class (:foreground ,plum-1))))\r
91 >>    `(gnus-group-news-1-low ((,class (:foreground ,plum-2))))\r
92 >> \r
93 >> Any hint would be greatly appreciated\r
94 >\r
95 > I'm not sure what the values of `class', `plum-1', and `plum-2' are in\r
96 > your above snippet or what the context of that snippet is, so I may be\r
97 > misunderstanding your problem, but it may help to know that\r
98 > `gnus-group-news-1' and `notmuch-search-line-faces' are very different\r
99 > types of variables.\r
100 >\r
101 > The value of `gnus-group-news-1' is a face; something like\r
102 > (:foreground "plum1").  It looks like what you've written above is\r
103 > actually a "face specification", which uses a bunch of conditions (the\r
104 > ,class part) to determine which of several potential faces to assign\r
105 > to the variable (though you listed only one face for each variable, so\r
106 > I'm not sure why you have a condition).  It's unfortunate that Emacs\r
107 > distinguishes faces and face specification, but that's how it is.\r
108 >\r
109 > `notmuch-search-line-faces' is *not* a face variable like\r
110 > `gnus-group-news-1'.  It's an association list that maps tags to\r
111 > faces.  As such, it won't work if your theme is trying to treat it\r
112 > like a face variable, since its value is not a face, but rather a data\r
113 > structure that has faces in it.\r