unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH v2] emacs: Add notmuch-show--build-queries.
@ 2016-10-11 17:41 Matt Armstrong
  2016-10-11 17:41 ` [PATCH v2] " Matt Armstrong
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Armstrong @ 2016-10-11 17:41 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-13 19:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-11 17:41 [PATCH v2] emacs: Add notmuch-show--build-queries Matt Armstrong
2016-10-11 17:41 ` [PATCH v2] " Matt Armstrong
2016-10-13 16:46   ` Mark Walters
2016-10-13 19:34     ` Matt Armstrong

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).