Re: notmuch-tag failing on trailing space

Subject: Re: notmuch-tag failing on trailing space

Date: Tue, 17 Aug 2021 08:52:09 +0300

To: David Edmondson, David Bremner, Alan Schmitt, notmuch

Cc:

From: Tomi Ollila


On Mon, Aug 16 2021, David Edmondson wrote:

> 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.

I'd also fix the source of the problem rather than the outcome...

Tomi
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: