[notmuch] [PATCH -v2] notmuch.el: Add face support to search and show mode

Aneesh Kumar K.V aneesh.kumar at linux.vnet.ibm.com
Sun Nov 22 04:21:06 PST 2009

On Sun, Nov 22, 2009 at 01:02:21PM +0100, Carl Worth wrote:
> On Sun, 22 Nov 2009 14:07:56 +0530, "Aneesh Kumar K.V" <aneesh.kumar at linux.vnet.ibm.com> wrote:
> > This add two faces, notmuch-show-subject-face and
> > notmuch-tag-unread-face. The first face is used to show the subject
> > line in the notmuch-show-mode and the second one to show the unread
> > tag in the notmuch-search-mode. We can set additional tags by setting
> > notmuch-tag-face-alist as below
> Hi Aneesh,
> I've been meaning to follow-up with you on this since I did get it
> working.
> > (setq notmuch-tag-face-alist '(("unread" . 'notmuch-tag-unread-face)
> > 				 ("inbox" . 'notmuch-tag-inbox-face)))
> It's interesting to be able to highlight specific tags like this. But I
> think that first I'd like to have a single 'notmuch-tag face to make it
> easier to see all the tag names, since they're hard to see among the
> subject. And then maybe after that have s 'notmuch-tag-important-face or
> something. I'm guessing that just that much would cover most people's
> needs, before needing to choose custom colors for each tag name.

The default search pattern for notmuch is inbox and unread right. So adding
both of them to the notmuch-tag-face-alist should color the tags properly.

> > +(defface notmuch-show-subject-face
> > + '((((class color) (background light)) (:foreground "yellow" :bold t))
> > +    (((class color) (background dark)) (:foreground "yellow" :bold t)))
> > +  "Notmuch show mode face used to highligh subject line."
> > +  :group 'notmuch)
> Color selection can be pretty difficult, and I don't think we're ever
> all going to agree on things. But I can at least say that I can't read
> yellow on white at all, (maybe yellow on black works out a bit better, I
> don't know).
> So I'd definitely like to hear people's ideas on what the presentation
> should look like here.
> First, the current reverse-video is definitely not something I really
> like. That was just a placeholder since I didn't know how to configure
> other faces, (and I needed _something_ to distinguish one message from
> another).
> Second, from the time I spent with sup, I found that it was hard for me
> to read entire lines of bold text. So I think I'd rather just have the
> header name ("Subject:", for example) in bold and the rest of the
> subject not bold. Hmm... maybe we could use a "From:" at the beginning
> of the one line summary.
> Finally, for separating one message from the other, I think I'd really
> just like a one-pixel line drawn between the last line of text of one
> message and the first line of text of the next message. Does anybody
> know how to achieve that?
> Back to the patch, I think I'll be able to push it as soon as I can
> apply it and still _see_ the subject lines. ;-)

One of the easy part with emacs is we can use customize-face and select 
notmuch-show-subject-face to select what ever suites your configuration.
For me with black background i found yellow with bold to be nice.


More information about the notmuch mailing list