Hello, On 2021-07-27 10:24, alan.schmitt@polytechnique.org writes: > I have an issue when using the vertico completion system to add tags to > messages that boils down to the following: the notmuch-tag function is > called like this: > notmuch-tag("id:CA+b3G33ad9PX5SuOwqaWS8TWBTtZcdguKtcQ3XmPvzSCsU..." ("+cwn ")) > and it fails because of the extra space at the end. > > Could notmuch-tag be modified to accept trailing spaces? Someone on the doom discord suggested the following workaround. #+begin_src emacs-lisp (defun trim-tag-changes (args) (list (car args) (mapcar #'s-trim-right (cadr args)))) (advice-add 'notmuch-tag :filter-args #'trim-tag-changes) #+end_src Could it be integrated directly in the notmuch-tag function? Best, Alan