X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=emacs%2Fnotmuch.el;h=be09f424a953c0686f552b7dd012ef5747b3d01a;hp=178dea212817a7fe3d3ee93aa804c8d0bcc5f1bc;hb=db96d67ba2e2ae01bc3139a3a22cc5433880cbae;hpb=2fbb6d05a931b23c307aee3af05ab488c6bca425 diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 178dea21..be09f424 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -507,8 +507,7 @@ and will also appear in a buffer named \"*Notmuch errors*\"." output))) (defun notmuch-search-add-tag-thread (tag) - (notmuch-call-notmuch-process "tag" (concat "+" tag) (notmuch-search-find-thread-id)) - (notmuch-search-set-tags (delete-dups (sort (cons tag (notmuch-search-get-tags)) 'string<)))) + (notmuch-search-add-tag-region tag (point) (point))) (defun notmuch-search-add-tag-region (tag beg end) (let ((search-id-string (mapconcat 'identity (notmuch-search-find-thread-id-region beg end) " or "))) @@ -522,8 +521,7 @@ and will also appear in a buffer named \"*Notmuch errors*\"." (forward-line)))))) (defun notmuch-search-remove-tag-thread (tag) - (notmuch-call-notmuch-process "tag" (concat "-" tag) (notmuch-search-find-thread-id)) - (notmuch-search-set-tags (delete tag (notmuch-search-get-tags)))) + (notmuch-search-remove-tag-region tag (point) (point))) (defun notmuch-search-remove-tag-region (tag beg end) (let ((search-id-string (mapconcat 'identity (notmuch-search-find-thread-id-region beg end) " or ")))