X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-tag.el;h=536315e9a788f7ae10dc2a58750fb99e1f874584;hb=e722b4f4;hp=f348d4ae2dc82c1b0c57570269cf4015a54d939b;hpb=4c79a2dabe38ac72eb9eb21620f2ffca5f1885c6;p=notmuch diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index f348d4ae..536315e9 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -397,7 +397,7 @@ Return all tags if no search terms are given." (split-string (with-output-to-string (with-current-buffer standard-output - (apply 'call-process notmuch-command nil t + (apply 'notmuch--call-process notmuch-command nil t nil "search" "--output=tags" "--exclude=false" search-terms))) "\n+" t)) @@ -486,7 +486,9 @@ notmuch-after-tag-hook will be run." (unless query (error "Nothing to tag!")) (when tag-changes - (run-hooks 'notmuch-before-tag-hook) + (notmuch-dlet ((tag-changes tag-changes) + (query query)) + (run-hooks 'notmuch-before-tag-hook)) (if (<= (length query) notmuch-tag-argument-limit) (apply 'notmuch-call-notmuch-process "tag" (append tag-changes (list "--" query))) @@ -494,7 +496,9 @@ notmuch-after-tag-hook will be run." (let ((batch-op (concat (mapconcat #'notmuch-hex-encode tag-changes " ") " -- " query))) (notmuch-call-notmuch-process :stdin-string batch-op "tag" "--batch"))) - (run-hooks 'notmuch-after-tag-hook))) + (notmuch-dlet ((tag-changes tag-changes) + (query query)) + (run-hooks 'notmuch-after-tag-hook)))) (defun notmuch-tag-change-list (tags &optional reverse) "Convert TAGS into a list of tag changes. @@ -549,7 +553,7 @@ and vice versa." name) (mapconcat #'identity tag-change " ")))) (push (list key name-string - `(lambda () (,tag-function ',tag-change))) + (lambda () (funcall tag-function tag-change))) action-map))) (push (list notmuch-tag-jump-reverse-key (if reverse