Duplicate tags in completion for notmuch-search-tag-all

Sebastian Poeplau sebastian.poeplau at eurecom.fr
Wed Apr 3 08:02:22 PDT 2019

Hi again,

I recently realized that `notmuch-search-tag-all' gives me duplicate
completion candidates in ivy; in particular, it seems to show "-X" once
for every thread (or message?) in the current view that has tag "X". So,
for example, when pressing '*' on a search view with 20 unread threads,
I get a completion list with "-unread" repeated a lot of times.

The docstring of `notmuch-read-tag-changes', called internally by
`notmuch-search-tag-all', explicitly says that "[the argument]
CURRENT-TAGS may contain duplicates", but it does not elaborate on how
they are supposed to be handled.

I assume my problem arises from the combination of using
`ivy-completing-read' as the `completing-read-function' and the list of
candidates containing duplicates. Is there some sort of contract for
`completing-read-function' requiring it to take care of duplicates? In
that case, I guess it would be ivy's responsibility. Otherwise, do you
see any problems with explicitly removing duplicates from the list of
current tags in `notmuch-read-tag-changes'?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20190403/f5c0def0/attachment.sig>

More information about the notmuch mailing list