aboutsummaryrefslogtreecommitdiff
path: root/emacs/notmuch-lib.el
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2022-07-01 18:45:45 -0300
committerDavid Bremner <david@tethera.net>2022-07-30 08:42:12 -0300
commitb3d466bf397a6f8d70bb50d6fa22c58e3d44badf (patch)
tree883e233c748bd6193aecb0cd2879cfefce2eab9b /emacs/notmuch-lib.el
parent4612f3eb3dbf16bf98ccbadef77d7a6f6361e692 (diff)
emacs/show: provide notmuch-show-choose-duplicate
This new command allows the user to interactively choose a different duplicate (file) to display for a given message in notmuch-show-mode. Since both tree and unthreaded view use notmuch-show-mode, this provides the same facility there.
Diffstat (limited to 'emacs/notmuch-lib.el')
-rw-r--r--emacs/notmuch-lib.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index cc706924..84ba8c5e 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -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)))