Re: notmuch-tag failing on trailing space

Subject: Re: notmuch-tag failing on trailing space

Date: Mon, 16 Aug 2021 11:03:35 +0200

To: notmuch

Cc:

From: Alan Schmitt


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
signature.asc (application/pgp-signature)
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: