This supercedes
id:1474003701-19831-1-git-send-email-marmstr...@google.com with a much
simpler patch.  My goal here is to make it easier to tweak
notmuch-show behavior without hacking on notmuch-show--build-buffer
itself, since it is responsible for a host of other tasks.

I'm still working (slowly) on coming up with a nice mental model for
the way notmuch's Emacs interface treats threads -vs- messages with
respect to "expansion" in show and tree results.  Although, to be
honest, wiht this patch and the following piece of advice,
notmuch-show buffers are doing what I want in all cases:

(defun my-notmuch-show--prepend-tag-unread (queries)
  "Prepend a tag:unread query to QUERIES.

Intended to be used as :filter-return advice on
`notmuch-show--build-queries'."
  (cons `(,notmuch-show-thread-id "and tag:unread") queries))

(advice-add 'notmuch-show--build-queries :filter-return
            #'my-notmuch-show--prepend-tag-unread)
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to