]> git.cworth.org Git - notmuch/blobdiff - emacs/notmuch-lib.el
emacs/show: provide notmuch-show-choose-duplicate
[notmuch] / emacs / notmuch-lib.el
index cc706924a7efcb9ab9e209c59f4fa641372eb7eb..84ba8c5e56de2aa151682bea74e30a4f3808b2e3 100644 (file)
@@ -1029,7 +1029,7 @@ status."
 
 (defvar-local notmuch-show-process-crypto nil)
 
-(defun notmuch--run-show (search-terms)
+(defun notmuch--run-show (search-terms &optional duplicate)
   "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
@@ -1038,6 +1038,8 @@ 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"))))
+    (when duplicate
+      (setq args (append args (list (format "--duplicate=%d" duplicate)))))
     (setq args (append args search-terms))
     (apply #'notmuch-call-notmuch-sexp args)))