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

From: Thomas Fitzsimmons <[email-masked]>
Date: Sat, 04 Feb 2023 19:48:30 -0500

Hi Julien,

Julien Cubizolles <[email-masked]> writes:

> 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.

OK, thanks for posting.  Is this with emacs-29 branch tip, i.e., what
will be released as Emacs 29.1?

Thomas