diff options
| author | David Bremner <david@tethera.net> | 2022-02-12 16:27:37 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-02-25 08:39:05 -0400 |
| commit | d298af9e9d75f076d767044738b4811a82f9b2ca (patch) | |
| tree | 7f517ef09b3e59c9793fedc1e7a93c3e14933fc7 | |
| parent | a70c93515b8a18941993dae0572d04466b1dc9f3 (diff) | |
emacs: remove non-batch code path from function notmuch-tag
It is no slower (according to T06-emacs) to use batch for everything,
and it simplifies the code.
| -rw-r--r-- | emacs/notmuch-tag.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index 8af09e68..ad0cb1c1 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -458,7 +458,11 @@ from TAGS if present." "Use batch tagging if the tagging query is longer than this. This limits the length of arguments passed to the notmuch CLI to -avoid system argument length limits and performance problems.") +avoid system argument length limits and performance problems. + +NOTE: this variable is no longer used.") + +(make-obsolete-variable 'notmuch-tag-argument-limit nil "notmuch 0.36") (defun notmuch-tag (query tag-changes) "Add/remove tags in TAG-CHANGES to messages matching QUERY. @@ -481,16 +485,13 @@ notmuch-after-tag-hook will be run." (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))) - ;; Use batch tag mode to avoid argument length limitations - (let ((batch-op (concat (mapconcat #'notmuch-hex-encode tag-changes " ") - " -- " query))) - (notmuch-call-notmuch-process :stdin-string batch-op "tag" "--batch"))) - (notmuch-dlet ((tag-changes tag-changes) + ;; Use batch tag mode to avoid argument length limitations + (let ((batch-op (concat (mapconcat #'notmuch-hex-encode tag-changes " ") + " -- " query))) + (notmuch-call-notmuch-process :stdin-string batch-op "tag" "--batch"))) + (notmuch-dlet ((tag-changes tag-changes) (query query)) - (run-hooks 'notmuch-after-tag-hook)))) + (run-hooks 'notmuch-after-tag-hook))) (defun notmuch-tag-change-list (tags &optional reverse) "Convert TAGS into a list of tag changes. |
