Re: notmuch-tag failing on trailing space

Subject: Re: notmuch-tag failing on trailing space

Date: Mon, 16 Aug 2021 16:48:17 +0100

To: David Bremner, Alan Schmitt, notmuch

Cc:

From: David Edmondson


On Monday, 2021-08-16 at 08:17:56 -07, David Bremner wrote:

> Alan Schmitt <alan.schmitt@polytechnique.org> writes:
>
>>
>> #+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?
>>
>
> That particular function won't work for us because it would introduce a
> new dependency on s.el. But if someone wants to make an equivalent using
> only core emacs functions and integrate it into notmuch-tag, that seems
> likely OK to me.

What if someone has trailing spaces on their tags deliberately?

This seems like an oddity of the code in `notmuch-read-tag-changes' that
appends a space to every possible completion. It would probably be a
more annoying change to some users, but I'd be more inclined to remove
that code than this change.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: