mu4e: contacts: use mu4e--contacts-set

We use to have mu4e--contacts-hash, with name mapping to rank; that was
needlessly complicated since most completion engine sort alphabetically, making
the rank totally irrelevant (in practice, it doesn't matter much from the
end-user pov).

Anyway, simplify that part, maintain a set of contacts without any rank (which
what the server delivers now).

Also update the _default_ mu4e-contact-process-function to filter out anything
with 'reply' since it's not very useful for autocompletion.
This commit is contained in:
Dirk-Jan C. Binnema
2022-05-09 21:22:17 +03:00
parent 81689f0af3
commit db86e7b5ee
4 changed files with 35 additions and 51 deletions

View File

@ -441,7 +441,7 @@ status, STATUS."
((looking-back "\\(from\\|to\\|cc\\|bcc\\|contact\\|recip\\):\\([a-zA-Z0-9/.@]*\\)" nil)
(list (match-beginning 2)
(match-end 2)
mu4e--contacts-hash
mu4e--contacts-set
:exit-function
#'mu4e--search-completion-contacts-action))
((looking-back "list:\\([a-zA-Z0-9/.@]*\\)" nil)