From 9ffb3a91d602b0487f3854a71f8b7fdbc0c15a41 Mon Sep 17 00:00:00 2001 From: David Belohrad Date: Tue, 11 Mar 2014 11:02:13 +0100 Subject: [PATCH] Re: how to specify notmuch colors in emacs24 --- cd/35b0705648f528806a0327cd1812a4f4923548 | 113 ++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 cd/35b0705648f528806a0327cd1812a4f4923548 diff --git a/cd/35b0705648f528806a0327cd1812a4f4923548 b/cd/35b0705648f528806a0327cd1812a4f4923548 new file mode 100644 index 000000000..14eaf6f90 --- /dev/null +++ b/cd/35b0705648f528806a0327cd1812a4f4923548 @@ -0,0 +1,113 @@ +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 491F1431FBF + for ; Tue, 11 Mar 2014 03:02:38 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 FOn4DNklKU7c for ; + Tue, 11 Mar 2014 03:02:34 -0700 (PDT) +Received: from server.belohrad.ch (static-212-101-19-163.adsl.solnet.ch + [212.101.19.163]) + (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5CD21431FBD + for ; Tue, 11 Mar 2014 03:02:33 -0700 (PDT) +Received: from beesknees.cern.ch.belohrad.ch (beesknees.cern.ch + [137.138.197.99]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) (Authenticated sender: david) + by server.belohrad.ch (Postfix) with ESMTPSA id B212C2C014F; + Tue, 11 Mar 2014 11:04:11 +0100 (CET) +From: David Belohrad +To: Austin Clements +Subject: Re: how to specify notmuch colors in emacs24 +In-Reply-To: <20140306142730.GH4709@mit.edu> +References: + <20140306142730.GH4709@mit.edu> +User-Agent: Notmuch/0.17+54~g9ac863c (http://notmuchmail.org) Emacs/24.3.50.1 + (x86_64-unknown-linux-gnu) +Date: Tue, 11 Mar 2014 11:02:13 +0100 +Message-ID: +MIME-Version: 1.0 +Content-Type: text/plain +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: Tue, 11 Mar 2014 10:02:38 -0000 + +Hi All, + +thanks for extensive answers on this thread. The plum-1 and other +definitions are coming from 'tango-dark' theme of emacs 24, which I +wanted to modify. I understood hence, that the two ways of settings the +colors (notmuch/emacs24) are so far somehow incompatible and hence there +is no way how to specify the notmuch colors the emacs24 way. + +many thanks +.d. + + + +Austin Clements writes: + +> 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