emacs: Don't open unread messages by default.

When searching for an individual message, (by message id, say), it's
really annoying to have the entire thread open just because the thread
was archived without ever having been read.

This means that the "unread" tag is a lot less special, and it really
just exists as a mild cue for the user.
This commit is contained in:
Carl Worth 2010-02-26 10:40:23 -08:00
parent 3ab18d1c22
commit f99b46c607

View file

@ -828,8 +828,8 @@ is what to put on the button."
(defun notmuch-show-markup-body (depth match btn) (defun notmuch-show-markup-body (depth match btn)
"Markup a message body, (indenting, buttonizing citations, "Markup a message body, (indenting, buttonizing citations,
etc.), and conditionally hiding the body itself if the message etc.), and hiding the body itself if the message does not match
has been read and does not match the current search. the current search.
DEPTH specifies the depth at which this message appears in the DEPTH specifies the depth at which this message appears in the
tree of the current thread, (the top-level messages have depth 0 tree of the current thread, (the top-level messages have depth 0
@ -850,7 +850,7 @@ before the delimiter marking the beginning of the body."
(overlay-put (make-overlay beg end) (overlay-put (make-overlay beg end)
'invisible invis-spec) 'invisible invis-spec)
(button-put btn 'invisibility-spec invis-spec) (button-put btn 'invisibility-spec invis-spec)
(if (not (or (notmuch-show-message-unread-p) match)) (if (not match)
(add-to-invisibility-spec invis-spec))) (add-to-invisibility-spec invis-spec)))
(set-marker beg nil) (set-marker beg nil)
(set-marker end nil) (set-marker end nil)