Subject: Re: bug#59314: 29.0.50; EUDC and message-mode header completion

From: Julien Cubizolles <[email-masked]>
Date: Tue, 31 Jan 2023 14:04:36 +0100

Eric Abrahamsen <[email-masked]> writes:

> Address completion in message-mode has stopped working in master,
> possibly as a result of 0e25a39e69acca0324c326ea8e46b1725594bff5. This
> has been reported for several contact-management backends that expect to
> have their completions available with <TAB>.
>
> `completion-at-point-functions' contains '(eudc-capf-complete
> message-completion-function t) at this point -- `eudc-capf-complete'
> returns no matches, and no other functions in the list are consulted.
>
> On gnus.general, someone using BBDB and corfu reported that this recipe
> fixed the problem:
>
>   (setq eudc-server-hotlist '(("localhost" . bbdb)))
>
>   (add-hook 'message-mode-hook
>             (lambda ()
>               (setq-local completion-at-point-functions
>                           (delq 'message-completion-function
>                                 completion-at-point-functions))))

In my case, also using corfu and BBDB, I'm currently happy with :

--8<---------------cut here---------------start------------->8---
(setq eudc-server-hotlist '(("localhost" . bbdb)))

(add-hook 'message-mode-hook
          (lambda ()
            (add-to-list 'completion-at-point-functions
                         #'eudc-capf-complete)))
--8<---------------cut here---------------end--------------->8---

The removal of message-completion-function was breaking completion for
the Gcc: field and 'eudc-capf-complete seems enough to get completion in
the To: field.

-- 
Julien Cubizolles