how to specify notmuch colors in emacs24

Austin Clements amdragon at MIT.EDU
Thu Mar 6 06:27:30 PST 2014


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.


More information about the notmuch mailing list