[PATCH v2] emacs: Add notmuch-show--build-queries.

Matt Armstrong marmstrong at google.com
Tue Oct 11 10:41:46 PDT 2016


This supercedes
id:1474003701-19831-1-git-send-email-marmstrong at 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)


More information about the notmuch mailing list