Duplicate tags in completion for notmuch-search-tag-all
david at tethera.net
Thu Apr 4 16:26:24 PDT 2019
Sebastian Poeplau <sebastian.poeplau at eurecom.fr> writes:
> 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'?
I noticed that completing-read can take a hash-table, so maybe
collecting tags as a hash-table in the first place would be an efficient
way to deduplicate them. That would require more changes though, since
it would move the deduplication into the callers of notmuch-read-tag-changes.
I worry a bit about the movement of deduplication from the (brute
force) C code in minibuf.c into notmuch elisp, but I could be convinced,
e.g. with some profiling.
More information about the notmuch