On Wednesday, 2019-11-13 at 00:00:04 -08, William Casarin wrote: > This is an unbound function that is quite useful. It opens a selected > thread in notmuch-tree from the current search query. Seems fine to me. Not crazy about the binding, but it will suffice. > Signed-off-by: William Casarin <jb55@jb55.com> > --- > emacs/notmuch.el | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > index 773d1206..b5c361ca 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -517,10 +517,13 @@ thread." > (concat "*" (truncate-string-to-width subject 30 nil nil t) "*")) > (message "End of search results.")))) > > -(defun notmuch-tree-from-search-current-query () > +(put 'notmuch-tree-from-search-current-query 'notmuch-prefix-doc > + "Show the selected thread with notmuch-tree") > +(defun notmuch-tree-from-search-current-query (&optional search-thread) > "Call notmuch tree with the current query" > - (interactive) > - (notmuch-tree notmuch-search-query-string)) > + (interactive "P") > + (if search-thread (notmuch-tree-from-search-thread) > + (notmuch-tree notmuch-search-query-string))) > > (defun notmuch-tree-from-search-thread () > "Show the selected thread with notmuch-tree" > > base-commit: 7ad7cfbff232431377562271901ee00202bf0bd0 > -- > 2.23.0 dme. -- But he said, leave me alone, I'm a family man. _______________________________________________ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch