I have *just* realized, after writing all this code and sending the patch, that someone else might have discussed this here. Oops. So, turns out, it *has* been discussed, but it doesn't look like anyone tackled that problem fully just yet. The closest we have in the archive is (author in CC): <71a3382b-3f1b-4b81-883c-b4a8bd710888%40picnicpark.org> ... which writes a new `kea/notmuch-address-message-capf' function from scratch. It might, however, do a better job than i do at taking into account the "harvest" process, which I only discovered after writing the patch and decided I would pretend it doesn't exist (and is probably inaccurate). So that might be a flaw with my patch already, but in my defense, WTF is that harvest thing!? :) Another discussion about capf was about integration with EUDC: <8a437e3f646f7972c86c4aae57ae7452%40condition-alpha.com> But I don't quite understand what EUDC is or why it matters here. Might be *some* overlap, not sure. Finally, there's this whole other thread from 2022 about capf, but it's quite diffuse and I couldn't make heads or tails of it. The head of the thread according to the online archives is: <m2v8xnn1l3.fsf%40guru.guru-group.fi> ... but that's a reply to... something else, so I'm not sure. As usual, your mileage may vary. :) To test my patch, you apply it, restart Emacs (or rewire `message-completion-alist' like Keith Amidon did), fire off a new email, start entering an address, and hit TAB (or, if you have corfu, just wait for the timeout). a. -- We don't need any more heroes. We just need someone to take out recycling. - Banksy _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org