Hello, On Thu, Dec 09, 2021 at 09:43:19PM +0100, Leo wrote: > From: Leo > > notmuch-extract-patch is a command line tool from the elpa-mailscripts > package that extracts patches from a thread. It's a useful way to > extract the latest patch series from an email thread and filter out the > replies and reviews. > --- > piem-notmuch.el | 25 +++++++++++++++++++++---- > 1 file changed, 21 insertions(+), 4 deletions(-) > > diff --git a/piem-notmuch.el b/piem-notmuch.el > index 8b2a353..05c03ab 100644 > --- a/piem-notmuch.el > +++ b/piem-notmuch.el > + (tid > + ;; If `notmuch-show' was called with a notmuch query rather > + ;; than a thread ID, as `org-notmuch-follow-link' in > + ;; org-notmuch.el does, then `notmuch-show-thread-id' might > + ;; be an arbitrary notmuch query instead of a thread ID. We > + ;; need to wrap such a query in thread:{} before passing it > + ;; to notmuch-extract-patch(1), or we might not get a whole > + ;; thread extracted (e.g. if the query is just id:foo) This text comment is lifted straight from mailscripts.el, so please be sure to add "(C) 2019 Sean Whitton