X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch-tag.el;h=ad0cb1c13c859a5232ce3a80861f5a25c38b5bc1;hb=d298af9e9d75f076d767044738b4811a82f9b2ca;hp=8af09e68b8b42143b958d26a55740ffcdfcc6b89;hpb=c7c422ded29e73f7f6b53e82c40a36c93c041253;p=notmuch 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.