X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch-lib.el;fp=emacs%2Fnotmuch-lib.el;h=cc706924a7efcb9ab9e209c59f4fa641372eb7eb;hp=1e631d0eb0147a19da00bed2f8af6dbd3dff1dcf;hb=5500868bd96f9461a230d16839591cb7ebc035df;hpb=6a9ae990990848ec99107f2e2e6b6ae12dcd33df diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 1e631d0e..cc706924 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -1029,6 +1029,18 @@ status." (defvar-local notmuch-show-process-crypto nil) +(defun notmuch--run-show (search-terms) + "Return a list of threads of messages matching SEARCH-TERMS. + +A thread is a forest or list of trees. A tree is a two element +list where the first element is a message, and the second element +is a possibly empty forest of replies." + (let ((args '("show" "--format=sexp" "--format-version=5"))) + (when notmuch-show-process-crypto + (setq args (append args '("--decrypt=true")))) + (setq args (append args search-terms)) + (apply #'notmuch-call-notmuch-sexp args))) + ;;; Generic Utilities (defun notmuch-interactive-region ()