Unread handling

David Edmondson dme at dme.org
Mon Nov 11 00:14:44 PST 2019

On Monday, 2019-11-11 at 00:16:17 +01, Johan Parin wrote: 

> I'm probably doing something wrong but I find myself frustrated 
> with the handling of unread in the emacs-mua. 
> In notmuch-search I found the default bold face for unread of 
> notmuch-search-unread-face not enough to make them stand out so 
> I tried something like 
>   (setq notmuch-search-line-faces 
>       '(("unread" . '(:foreground "SkyeBlue")) 

   (setq notmuch-search-line-faces 
       '(("unread" :foreground "SkyeBlue")))

(And I don't have a “SkyeBlue”, just “SkyBlue”.) 

> which ought to work according to the doc, but did not 
> work. Fortunately however it works to define a new face with 
> defface and use that. 
>   (setq notmuch-search-line-faces 
>         '(("unread" . my/notmuch-unread-face))) 
> So that problem solved. 
> My real frustration lies in the thread view. Typically threads 
> will be partially read and I want to read only unread messages. 
> I find the show view confusing because I don't clearly see the 
> message boundaries. Also I always need to start with C-u M-RET 
> to get an overview of the thread. In this view the unread stand 
> out a bit due to the colorization of the unread tag, which is 
> typically visible. I still would like to be able to colorize the 
> entire line or the author here, for unread. Is it possible? 

The single-line summary of the message is drawn using 
notmuch-message-summary-face, which you can customise. This would 
be the same for all messages in the thread, though (no distinction 
for “unread”).

You could perhaps abuse notmuch-tag-formats to force unread 
message header lines to stand out more.
> I'm trying instead to use the tree view, this seems to me the 
> more natural way to view threads. So I immediately do `Z' 
> whenever I enter a thread. I would like to have the option to 
> enter tree view automatically for a thread from the search 
> buffer. Is it possible? 

“Z” in search mode should take you directly to tree mode.
> In tree view however, again I would like to colorize the unread 
> messages. Haven't found a way to do this and reading 
> notmuch-tree.el it seems it's not possible. Is there a way? 
> Since I like to keep my window to 80 chars the tag display is 
> outside the visible area and I find myself doing C-e to find the 
> unread tags. This is very inconvenient. 
> Also I would like to navigate to the next unread message, and 
> would prefer the `n' binding to do that instead of go to next 
> message. Haven't found a binding for that. 
> Finally when entering the tree view I would like the first 
> unread message to automatically be shown. 

I'm not a tree mode user, so I'm not familiar with it.
> I guess the above can be summarized as, I would like to have the 
> option to have a gnus-ish way of viewing threads. 

Tree mode is the closest, I think.
> Again, I'm probably doing something wrong and / or am missing 
> some possibilities here, it would be very interesting to hear 
> others work flow for thread reading. 

notmuch doesn't generally obsess about the “unread” tag quite as 
much as the “inbox” tag. Maybe you are used to orienting yourself 
around “unread” (which is important in Gnus, I'd agree) and 
thinking about how to look at “inbox” instead would help?

I was better off when I was on your side, and I was holding on.

More information about the notmuch mailing list