Re: [PATCH] implement a capf for address completion

Subject: Re: [PATCH] implement a capf for address completion

Date: Fri, 23 Aug 2024 18:32:03 +0200

To: David Bremner, Antoine Beaupré, notmuch@notmuchmail.org

Cc:

From: Alexander Adolf


First of all, apologies for being late to the discussion, and for having
missed its initial part.

I have been tinkering with email address completion in message mode for
a while, and would like to add a few comments with the hope of providing
slightly bigger picture, and with the hope that it may help you in
deciding on possible ways forward.

The email completion in message.el is in a state of - let's say "layers
of history". Having code specific to several email address databases in
there doesn't seem to provide a clear road-map how future extensions
(for instance adding notmuch's address database) will work.
Notmuch-address's fiddling with message-completion-alist can get in the
way, and message-tab is a pain of its own.

I have hence experimented with removing all email address database
specific code from message.el, and making it use a single mechanism
only, EUDC (lisp/net/eudc.el). EUDC already has backends for querying
ldap, bbdb, mailabbrev, and ecomplete. Queries to EUDC deliver
aggregated results from all configured backends. I have thus written a
new EUDC backend so it can additionally query notmuch-address (code
attached for reference). Adapting that to any potential new notmuch
email address lookup would be no big deal, of course. Now, when I need
completion for an email address in (notmuch) message mode, it queries
EUDC, and I am presented a combined list of results from all EUDC
backends I have configured. Nice.

While this may be cool as an exercise, and for keeping in a personal
branch (which is what I'll do for the time being), it does not provide
any immediate benefit for the notmuch project, however, because there is
no indication as to whether and when in the future message.el may indeed
be updated to only use EUDC for email addresses.

In that light, tarsius's proposed notmuch-addr code, and without having
tried it, does seem like it could be a worthwhile improvement over the
current state of things. I'd therefore tend to welcome Antoine's
proposed steps. I'd also offer to test drive tarsius's code (or
variations of it) in my setup.


Hoping to have helped, and looking forward to your thoughts,

  --alexander


eudcb-notmuch-address.el (application/emacs-lisp)
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: