GNU bug report logs - #59314
29.0.50; EUDC and message-mode header completion

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Eric Abrahamsen <eric@HIDDEN>; dated Wed, 16 Nov 2022 18:06:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 59314 <at> debbugs.gnu.org:


Received: (at 59314) by debbugs.gnu.org; 17 Nov 2022 02:04:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 16 21:04:17 2022
Received: from localhost ([127.0.0.1]:58598 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovUGH-000393-9x
	for submit <at> debbugs.gnu.org; Wed, 16 Nov 2022 21:04:17 -0500
Received: from mail.ericabrahamsen.net ([52.70.2.18]:58696)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1ovUGE-00038p-GU
 for 59314 <at> debbugs.gnu.org; Wed, 16 Nov 2022 21:04:15 -0500
Received: from localhost (c-71-197-232-41.hsd1.wa.comcast.net [71.197.232.41])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 30FD8FA59E;
 Thu, 17 Nov 2022 02:04:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net;
 s=mail; t=1668650647;
 bh=BrBV/wtIfJeVEK6BvcsGvEvS/TpkubG7OgRkIZi2nTo=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=dFVKv4TFWa41RLA7thjxSP+rMyZm1oMYXIv0bhuBNIbqTWbR2JB9W7foj8cFgy/DT
 Qkq1nN43XK97AkO3VitOucTz2fg23NUKZ1hJtmFI+8qClCusiQ4Tdic74HM5Ft18av
 ZRePCex7sVPngGu1xWJ8ZdEjigz1xQvbM17l0q5I=
From: Eric Abrahamsen <eric@HIDDEN>
To: Thomas Fitzsimmons <fitzsim@HIDDEN>
Subject: Re: bug#59314: 29.0.50; EUDC and message-mode header completion
In-Reply-To: <m31qq2mkig.fsf@HIDDEN> (Thomas Fitzsimmons's message of
 "Wed, 16 Nov 2022 20:34:31 -0500")
References: <87a64q7p25.fsf@HIDDEN> <m3iljeemj5.fsf@HIDDEN>
 <878rka1y4n.fsf@HIDDEN> <m35yfemxho.fsf@HIDDEN>
 <87zgcqzg7s.fsf@HIDDEN> <m31qq2mkig.fsf@HIDDEN>
Date: Wed, 16 Nov 2022 18:04:06 -0800
Message-ID: <87leoafiax.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59314
Cc: Alexander Adolf <alexander.adolf@HIDDEN>,
 59314 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


On 11/16/22 20:34 PM, Thomas Fitzsimmons wrote:
> Eric Abrahamsen <eric@HIDDEN> writes:
>
>> Thomas Fitzsimmons <fitzsim@HIDDEN> writes:
>>
>>> Hi Eric,
>>>
>>> Eric Abrahamsen <eric@HIDDEN> writes:
>>>
>>>> On 11/16/22 14:18 PM, Thomas Fitzsimmons wrote:
>>>>> Hi Eric,
>>>>>
>>>>> Thanks for filing this.
>>>>>
>>>>> Eric Abrahamsen <eric@HIDDEN> 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.
>>>>>
>>>>> I just checked and I didn't think the recent patch I pushed,
>>>>> 0e25a39e6..., should have affected completion-at-point-functions.  It
>>>>> did change the default of eudc-server-hotlist from `nil' to
>>>>> `(("localhost" . ecomplete) ("localhost" . mailabbrev))".  I thought
>>>>> that should only affect EUDC users who have not customized
>>>>> eudc-server-hotlist.
>>>>>
>>>>> `eudc-capf-complete' was added to `message-mode' in commit
>>>>> 620ac6735...  I'm pretty sure that commenting out this line in
>>>>> message.el will restore prior behaviour, but I don't yet know what prior
>>>>> behaviour should be (see below).
>>>>>
>>>>> (add-hook 'completion-at-point-functions #'message-completion-function nil t)
>>>>>
>>>>>> 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))))
>>>>>>
>>>>>> Someone else *not* using corfu reported that that didn't work for them.
>>>>>> Dunno.
>>>>>
>>>>> I'm not sure what the out-of-the-box behaviour here is meant to be.  Can
>>>>> you make a recipe starting from "emacs -Q" (including adding dummy email
>>>>> addresses somewhere) that makes completion work how you want it to?  For
>>>>> me:
>>>>>
>>>>> emacs -Q
>>>>> C-x m TAB
>>>>>
>>>>> inserts four spaces and prints in *Messages*:
>>>>>
>>>>> Loading eudcb-ecomplete...done
>>>>> Loading eudcb-mailabbrev...done
>>>>>
>>>>> (Those are new, due to 0e25a39e6... but I thought should be harmless.)
>>>>
>>>> Yuck, it's been a long time since I looked at this...
>>>>
>>>> In emacs -Q, message-mode `completion-at-point-functions' is:
>>>>
>>>> (eudc-capf-complete message-completion-function t)
>>>>
>>>> Actually that's what it is in my regular Emacs, as well. All I'd need
>>>> for EBDB (and BBDB and everything else) is for
>>>> `message-completion-function' to get called, which it isn't. I believe
>>>> you could allow this by having `eudc-capf-complete' return nil, or have
>>>> `eudc-capf-message-expand-name' return a `(list beg end <table>)'
>>>> structure that includes the prop `:exclusive 'no' at the end of it. That
>>>> would allow a fallthrough to the next function.
>>>
>>> Ah, OK, that's what happened then.  The most recent patch I pushed made
>>> `eudc-server-hotlist' non-nil by default, which makes
>>> `eudc-capf-message-expand-name' do something other than return nil.
>>>
>>> Can you try just (setq eudc-server-hotlist nil) and confirm that avoids
>>> the breakage?
>>>
>>> If it does, I'll revert that part of the patch for now.
>>
>> It does! Thanks.
>
> As I was considering reverting the default change, I figured that this
> is likely a bug in `eudc-capf-message-expand-name'; it should return nil
> if it gets no results from any EUDC backend, right?  I pushed a fix for
> that.  Can you apply it to your tree and see if your completion setup
> works again?

Yes that worked, rebuilt Emacs with no additional changes.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59314; Package emacs. Full text available.

Message received at 59314 <at> debbugs.gnu.org:


Received: (at 59314) by debbugs.gnu.org; 17 Nov 2022 01:34:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 16 20:34:42 2022
Received: from localhost ([127.0.0.1]:58575 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovTnd-0002Nq-JR
	for submit <at> debbugs.gnu.org; Wed, 16 Nov 2022 20:34:42 -0500
Received: from mail.fitzsim.org ([69.165.165.189]:46164)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <fitzsim@HIDDEN>) id 1ovTnb-0002Nd-1f
 for 59314 <at> debbugs.gnu.org; Wed, 16 Nov 2022 20:34:39 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fitzsim.org
 ; s=20220430;
 h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=u1zw8x1tZaM4z6GtOzvgJm/2n9Ckic3O0JTkxey6UvU=; b=J3uHUkjwxUP9+1fZheH2oPfSy9
 UfEagHa2tphPOCNFnUV1pzR8pQAW2l0YgaT7c8lfq5AVegIwED4WVZa6OJM/nxjf1dws/z5paBx4Q
 fAwanu54cv3vFMoOulvrB966dZ4oA8UQLu8WnA7WgVF9vBBv0Vx4LKhlhp9KLyIpvEwubudOUrzfo
 VU6Z6DvX+Bq3aCY3gqjnVSpD6lv8YErt9CkewdZDIahXNJszuLVnFrYBcSCpvHCxxUSZ6+nZSlZT2
 c5LEp/MFGHG96zuICvIvAVudCNIsGgeBC8Bym62cEPGNszUfJ1XgJiv7spyVc6bmp1CEWvqWM6kd0
 wYvL+QdQ==;
Received: from [192.168.1.1] (helo=localhost.localdomain)
 by mail.fitzsim.org with esmtpsa (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2)
 (envelope-from <fitzsim@HIDDEN>)
 id 1ovTnU-000DG6-6Y; Wed, 16 Nov 2022 20:34:32 -0500
From: Thomas Fitzsimmons <fitzsim@HIDDEN>
To: Eric Abrahamsen <eric@HIDDEN>
Subject: Re: bug#59314: 29.0.50; EUDC and message-mode header completion
In-Reply-To: <87zgcqzg7s.fsf@HIDDEN> (Eric Abrahamsen's message of
 "Wed, 16 Nov 2022 14:28:55 -0800")
References: <87a64q7p25.fsf@HIDDEN> <m3iljeemj5.fsf@HIDDEN>
 <878rka1y4n.fsf@HIDDEN> <m35yfemxho.fsf@HIDDEN>
 <87zgcqzg7s.fsf@HIDDEN>
Date: Wed, 16 Nov 2022 20:34:31 -0500
Message-ID: <m31qq2mkig.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59314
Cc: Alexander Adolf <alexander.adolf@HIDDEN>,
 59314 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Eric Abrahamsen <eric@HIDDEN> writes:

> Thomas Fitzsimmons <fitzsim@HIDDEN> writes:
>
>> Hi Eric,
>>
>> Eric Abrahamsen <eric@HIDDEN> writes:
>>
>>> On 11/16/22 14:18 PM, Thomas Fitzsimmons wrote:
>>>> Hi Eric,
>>>>
>>>> Thanks for filing this.
>>>>
>>>> Eric Abrahamsen <eric@HIDDEN> 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.
>>>>
>>>> I just checked and I didn't think the recent patch I pushed,
>>>> 0e25a39e6..., should have affected completion-at-point-functions.  It
>>>> did change the default of eudc-server-hotlist from `nil' to
>>>> `(("localhost" . ecomplete) ("localhost" . mailabbrev))".  I thought
>>>> that should only affect EUDC users who have not customized
>>>> eudc-server-hotlist.
>>>>
>>>> `eudc-capf-complete' was added to `message-mode' in commit
>>>> 620ac6735...  I'm pretty sure that commenting out this line in
>>>> message.el will restore prior behaviour, but I don't yet know what prior
>>>> behaviour should be (see below).
>>>>
>>>> (add-hook 'completion-at-point-functions #'message-completion-function nil t)
>>>>
>>>>> 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))))
>>>>>
>>>>> Someone else *not* using corfu reported that that didn't work for them.
>>>>> Dunno.
>>>>
>>>> I'm not sure what the out-of-the-box behaviour here is meant to be.  Can
>>>> you make a recipe starting from "emacs -Q" (including adding dummy email
>>>> addresses somewhere) that makes completion work how you want it to?  For
>>>> me:
>>>>
>>>> emacs -Q
>>>> C-x m TAB
>>>>
>>>> inserts four spaces and prints in *Messages*:
>>>>
>>>> Loading eudcb-ecomplete...done
>>>> Loading eudcb-mailabbrev...done
>>>>
>>>> (Those are new, due to 0e25a39e6... but I thought should be harmless.)
>>>
>>> Yuck, it's been a long time since I looked at this...
>>>
>>> In emacs -Q, message-mode `completion-at-point-functions' is:
>>>
>>> (eudc-capf-complete message-completion-function t)
>>>
>>> Actually that's what it is in my regular Emacs, as well. All I'd need
>>> for EBDB (and BBDB and everything else) is for
>>> `message-completion-function' to get called, which it isn't. I believe
>>> you could allow this by having `eudc-capf-complete' return nil, or have
>>> `eudc-capf-message-expand-name' return a `(list beg end <table>)'
>>> structure that includes the prop `:exclusive 'no' at the end of it. That
>>> would allow a fallthrough to the next function.
>>
>> Ah, OK, that's what happened then.  The most recent patch I pushed made
>> `eudc-server-hotlist' non-nil by default, which makes
>> `eudc-capf-message-expand-name' do something other than return nil.
>>
>> Can you try just (setq eudc-server-hotlist nil) and confirm that avoids
>> the breakage?
>>
>> If it does, I'll revert that part of the patch for now.
>
> It does! Thanks.

As I was considering reverting the default change, I figured that this
is likely a bug in `eudc-capf-message-expand-name'; it should return nil
if it gets no results from any EUDC backend, right?  I pushed a fix for
that.  Can you apply it to your tree and see if your completion setup
works again?

Thanks,
Thomas




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59314; Package emacs. Full text available.

Message received at 59314 <at> debbugs.gnu.org:


Received: (at 59314) by debbugs.gnu.org; 17 Nov 2022 01:16:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 16 20:16:44 2022
Received: from localhost ([127.0.0.1]:58541 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovTWG-0001vR-Gj
	for submit <at> debbugs.gnu.org; Wed, 16 Nov 2022 20:16:44 -0500
Received: from mail.ericabrahamsen.net ([52.70.2.18]:36844)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1ovTWD-0001vE-GL
 for 59314 <at> debbugs.gnu.org; Wed, 16 Nov 2022 20:16:43 -0500
Received: from localhost (unknown [76.135.104.211])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id EAA70FA59E;
 Thu, 17 Nov 2022 01:16:34 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net;
 s=mail; t=1668647795;
 bh=7nraG8W41v20Iu0w4cCWRRpiRdodFEm6rf4Jqma+UrA=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=js9Ns4DA5zzpFGwl6jq1szgDfJlQIzbmx1wpT+czUPja1vB5I5DRpadgJjiE9rrOp
 s3C3BXWHc7zKKlRyrgZHKl6bzOhppZDOuemh9VVrwkzz5dzgRY6v9k1q/JgKtnqwUo
 F/oBTD6ASJZvQ+oGlstmFuTVx8QG3WfXXyZgDMwA=
From: Eric Abrahamsen <eric@HIDDEN>
To: Thomas Fitzsimmons <fitzsim@HIDDEN>
Subject: Re: bug#59314: 29.0.50; EUDC and message-mode header completion
In-Reply-To: <m35yfemxho.fsf@HIDDEN> (Thomas Fitzsimmons's message of
 "Wed, 16 Nov 2022 15:54:11 -0500")
References: <87a64q7p25.fsf@HIDDEN> <m3iljeemj5.fsf@HIDDEN>
 <878rka1y4n.fsf@HIDDEN> <m35yfemxho.fsf@HIDDEN>
Date: Wed, 16 Nov 2022 17:16:33 -0800
Message-ID: <87k03uz8ge.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59314
Cc: Alexander Adolf <alexander.adolf@HIDDEN>,
 59314 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


On 11/16/22 15:54 PM, Thomas Fitzsimmons wrote:
> Hi Eric,
>
> Eric Abrahamsen <eric@HIDDEN> writes:
>
>> On 11/16/22 14:18 PM, Thomas Fitzsimmons wrote:
>>> Hi Eric,
>>>
>>> Thanks for filing this.
>>>
>>> Eric Abrahamsen <eric@HIDDEN> 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.
>>>
>>> I just checked and I didn't think the recent patch I pushed,
>>> 0e25a39e6..., should have affected completion-at-point-functions.  It
>>> did change the default of eudc-server-hotlist from `nil' to
>>> `(("localhost" . ecomplete) ("localhost" . mailabbrev))".  I thought
>>> that should only affect EUDC users who have not customized
>>> eudc-server-hotlist.
>>>
>>> `eudc-capf-complete' was added to `message-mode' in commit
>>> 620ac6735...  I'm pretty sure that commenting out this line in
>>> message.el will restore prior behaviour, but I don't yet know what prior
>>> behaviour should be (see below).
>>>
>>> (add-hook 'completion-at-point-functions #'message-completion-function nil t)
>>>
>>>> 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))))
>>>>
>>>> Someone else *not* using corfu reported that that didn't work for them.
>>>> Dunno.
>>>
>>> I'm not sure what the out-of-the-box behaviour here is meant to be.  Can
>>> you make a recipe starting from "emacs -Q" (including adding dummy email
>>> addresses somewhere) that makes completion work how you want it to?  For
>>> me:
>>>
>>> emacs -Q
>>> C-x m TAB
>>>
>>> inserts four spaces and prints in *Messages*:
>>>
>>> Loading eudcb-ecomplete...done
>>> Loading eudcb-mailabbrev...done
>>>
>>> (Those are new, due to 0e25a39e6... but I thought should be harmless.)
>>
>> Yuck, it's been a long time since I looked at this...
>>
>> In emacs -Q, message-mode `completion-at-point-functions' is:
>>
>> (eudc-capf-complete message-completion-function t)
>>
>> Actually that's what it is in my regular Emacs, as well. All I'd need
>> for EBDB (and BBDB and everything else) is for
>> `message-completion-function' to get called, which it isn't. I believe
>> you could allow this by having `eudc-capf-complete' return nil, or have
>> `eudc-capf-message-expand-name' return a `(list beg end <table>)'
>> structure that includes the prop `:exclusive 'no' at the end of it. That
>> would allow a fallthrough to the next function.
>
> Ah, OK, that's what happened then.  The most recent patch I pushed made
> `eudc-server-hotlist' non-nil by default, which makes
> `eudc-capf-message-expand-name' do something other than return nil.
>
> Can you try just (setq eudc-server-hotlist nil) and confirm that avoids
> the breakage?
>
> If it does, I'll revert that part of the patch for now.

Also, I didn't mean that rant to be directed at you! I realized it might
have come off that way.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59314; Package emacs. Full text available.

Message received at 59314 <at> debbugs.gnu.org:


Received: (at 59314) by debbugs.gnu.org; 16 Nov 2022 22:29:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 16 17:29:06 2022
Received: from localhost ([127.0.0.1]:58411 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovQu2-0003zz-0y
	for submit <at> debbugs.gnu.org; Wed, 16 Nov 2022 17:29:06 -0500
Received: from mail.ericabrahamsen.net ([52.70.2.18]:40706)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1ovQtz-0003zV-VI
 for 59314 <at> debbugs.gnu.org; Wed, 16 Nov 2022 17:29:04 -0500
Received: from localhost (unknown [76.135.104.211])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id D043DFA0E3;
 Wed, 16 Nov 2022 22:28:56 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net;
 s=mail; t=1668637737;
 bh=98pA2Gi2rdd0OBjHjQhVOP+U+8p9kbTaZxBtmkcRPQI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=HEPlgHt4GTxRvjZ4NJ3aBVdGXOS7cASxIZoenO+UQAQvb1h2mV9Y+qwhqGzCDjU75
 XjsaEDBfyqDJNbUBusuVbvE7kj5hjkhdec20+HhVtm0RJehNtdNHtkkWFI9wdxmGU6
 D6FGeJexAy66gwGomL+UDs5ingtEp4dq9ppu+EW8=
From: Eric Abrahamsen <eric@HIDDEN>
To: Thomas Fitzsimmons <fitzsim@HIDDEN>
Subject: Re: bug#59314: 29.0.50; EUDC and message-mode header completion
In-Reply-To: <m35yfemxho.fsf@HIDDEN> (Thomas Fitzsimmons's message of
 "Wed, 16 Nov 2022 15:54:11 -0500")
References: <87a64q7p25.fsf@HIDDEN> <m3iljeemj5.fsf@HIDDEN>
 <878rka1y4n.fsf@HIDDEN> <m35yfemxho.fsf@HIDDEN>
Date: Wed, 16 Nov 2022 14:28:55 -0800
Message-ID: <87zgcqzg7s.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59314
Cc: Alexander Adolf <alexander.adolf@HIDDEN>,
 59314 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Thomas Fitzsimmons <fitzsim@HIDDEN> writes:

> Hi Eric,
>
> Eric Abrahamsen <eric@HIDDEN> writes:
>
>> On 11/16/22 14:18 PM, Thomas Fitzsimmons wrote:
>>> Hi Eric,
>>>
>>> Thanks for filing this.
>>>
>>> Eric Abrahamsen <eric@HIDDEN> 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.
>>>
>>> I just checked and I didn't think the recent patch I pushed,
>>> 0e25a39e6..., should have affected completion-at-point-functions.  It
>>> did change the default of eudc-server-hotlist from `nil' to
>>> `(("localhost" . ecomplete) ("localhost" . mailabbrev))".  I thought
>>> that should only affect EUDC users who have not customized
>>> eudc-server-hotlist.
>>>
>>> `eudc-capf-complete' was added to `message-mode' in commit
>>> 620ac6735...  I'm pretty sure that commenting out this line in
>>> message.el will restore prior behaviour, but I don't yet know what prior
>>> behaviour should be (see below).
>>>
>>> (add-hook 'completion-at-point-functions #'message-completion-function nil t)
>>>
>>>> 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))))
>>>>
>>>> Someone else *not* using corfu reported that that didn't work for them.
>>>> Dunno.
>>>
>>> I'm not sure what the out-of-the-box behaviour here is meant to be.  Can
>>> you make a recipe starting from "emacs -Q" (including adding dummy email
>>> addresses somewhere) that makes completion work how you want it to?  For
>>> me:
>>>
>>> emacs -Q
>>> C-x m TAB
>>>
>>> inserts four spaces and prints in *Messages*:
>>>
>>> Loading eudcb-ecomplete...done
>>> Loading eudcb-mailabbrev...done
>>>
>>> (Those are new, due to 0e25a39e6... but I thought should be harmless.)
>>
>> Yuck, it's been a long time since I looked at this...
>>
>> In emacs -Q, message-mode `completion-at-point-functions' is:
>>
>> (eudc-capf-complete message-completion-function t)
>>
>> Actually that's what it is in my regular Emacs, as well. All I'd need
>> for EBDB (and BBDB and everything else) is for
>> `message-completion-function' to get called, which it isn't. I believe
>> you could allow this by having `eudc-capf-complete' return nil, or have
>> `eudc-capf-message-expand-name' return a `(list beg end <table>)'
>> structure that includes the prop `:exclusive 'no' at the end of it. That
>> would allow a fallthrough to the next function.
>
> Ah, OK, that's what happened then.  The most recent patch I pushed made
> `eudc-server-hotlist' non-nil by default, which makes
> `eudc-capf-message-expand-name' do something other than return nil.
>
> Can you try just (setq eudc-server-hotlist nil) and confirm that avoids
> the breakage?
>
> If it does, I'll revert that part of the patch for now.

It does! Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59314; Package emacs. Full text available.

Message received at 59314 <at> debbugs.gnu.org:


Received: (at 59314) by debbugs.gnu.org; 16 Nov 2022 20:54:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 16 15:54:23 2022
Received: from localhost ([127.0.0.1]:58291 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovPQM-0001cU-Iv
	for submit <at> debbugs.gnu.org; Wed, 16 Nov 2022 15:54:22 -0500
Received: from mail.fitzsim.org ([69.165.165.189]:39006)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <fitzsim@HIDDEN>) id 1ovPQI-0001cF-NR
 for 59314 <at> debbugs.gnu.org; Wed, 16 Nov 2022 15:54:21 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fitzsim.org
 ; s=20220430;
 h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=d3T1JOrO18GpB/b/QvEEXctlZk5Xkd7GqXxBo4SJhmc=; b=jSXJvcWBuIotsqPiP9B8fM/XZU
 PVKvJ5Dopinx+hBm+9+hwhlhCeaSyOF5rfHdm49OD5GeX38nmUPAVk/TVO6DDKeU8dOuevMlZ7EM3
 lg4fLLfVmB5r+jPbek7Sj3guMCJdJKJZGLk79DhYwCF0LmnqC/2xzO8ERC7nYMuSYJ798nQQWokYa
 hQnSmIaHxeTfRzmlY41ARyUCDwu/gV2kwJHtjrqpaVDH2YcRjaLEIPf/7BLQHCsmsvD7GoFbnRqeK
 EnZSAln9ttqvHoFd+aTEXXwkXmrfcifCGaCgdtWEYk5Mj1pT3Yts+arex0SiMkED4WFr1FcWVq02L
 fC9gF3yg==;
Received: from [192.168.1.1] (helo=localhost.localdomain)
 by mail.fitzsim.org with esmtpsa (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2)
 (envelope-from <fitzsim@HIDDEN>)
 id 1ovPQC-000D8z-4N; Wed, 16 Nov 2022 15:54:12 -0500
From: Thomas Fitzsimmons <fitzsim@HIDDEN>
To: Eric Abrahamsen <eric@HIDDEN>
Subject: Re: bug#59314: 29.0.50; EUDC and message-mode header completion
In-Reply-To: <878rka1y4n.fsf@HIDDEN> (Eric Abrahamsen's message of
 "Wed, 16 Nov 2022 11:46:00 -0800")
References: <87a64q7p25.fsf@HIDDEN> <m3iljeemj5.fsf@HIDDEN>
 <878rka1y4n.fsf@HIDDEN>
Date: Wed, 16 Nov 2022 15:54:11 -0500
Message-ID: <m35yfemxho.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59314
Cc: Alexander Adolf <alexander.adolf@HIDDEN>,
 59314 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Eric,

Eric Abrahamsen <eric@HIDDEN> writes:

> On 11/16/22 14:18 PM, Thomas Fitzsimmons wrote:
>> Hi Eric,
>>
>> Thanks for filing this.
>>
>> Eric Abrahamsen <eric@HIDDEN> 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.
>>
>> I just checked and I didn't think the recent patch I pushed,
>> 0e25a39e6..., should have affected completion-at-point-functions.  It
>> did change the default of eudc-server-hotlist from `nil' to
>> `(("localhost" . ecomplete) ("localhost" . mailabbrev))".  I thought
>> that should only affect EUDC users who have not customized
>> eudc-server-hotlist.
>>
>> `eudc-capf-complete' was added to `message-mode' in commit
>> 620ac6735...  I'm pretty sure that commenting out this line in
>> message.el will restore prior behaviour, but I don't yet know what prior
>> behaviour should be (see below).
>>
>> (add-hook 'completion-at-point-functions #'message-completion-function nil t)
>>
>>> 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))))
>>>
>>> Someone else *not* using corfu reported that that didn't work for them.
>>> Dunno.
>>
>> I'm not sure what the out-of-the-box behaviour here is meant to be.  Can
>> you make a recipe starting from "emacs -Q" (including adding dummy email
>> addresses somewhere) that makes completion work how you want it to?  For
>> me:
>>
>> emacs -Q
>> C-x m TAB
>>
>> inserts four spaces and prints in *Messages*:
>>
>> Loading eudcb-ecomplete...done
>> Loading eudcb-mailabbrev...done
>>
>> (Those are new, due to 0e25a39e6... but I thought should be harmless.)
>
> Yuck, it's been a long time since I looked at this...
>
> In emacs -Q, message-mode `completion-at-point-functions' is:
>
> (eudc-capf-complete message-completion-function t)
>
> Actually that's what it is in my regular Emacs, as well. All I'd need
> for EBDB (and BBDB and everything else) is for
> `message-completion-function' to get called, which it isn't. I believe
> you could allow this by having `eudc-capf-complete' return nil, or have
> `eudc-capf-message-expand-name' return a `(list beg end <table>)'
> structure that includes the prop `:exclusive 'no' at the end of it. That
> would allow a fallthrough to the next function.

Ah, OK, that's what happened then.  The most recent patch I pushed made
`eudc-server-hotlist' non-nil by default, which makes
`eudc-capf-message-expand-name' do something other than return nil.

Can you try just (setq eudc-server-hotlist nil) and confirm that avoids
the breakage?

If it does, I'll revert that part of the patch for now.

Thanks,
Thomas




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59314; Package emacs. Full text available.

Message received at 59314 <at> debbugs.gnu.org:


Received: (at 59314) by debbugs.gnu.org; 16 Nov 2022 19:46:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 16 14:46:15 2022
Received: from localhost ([127.0.0.1]:58249 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovOMQ-0008NW-P2
	for submit <at> debbugs.gnu.org; Wed, 16 Nov 2022 14:46:15 -0500
Received: from mail.ericabrahamsen.net ([52.70.2.18]:36516)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1ovOMO-0008NI-JM
 for 59314 <at> debbugs.gnu.org; Wed, 16 Nov 2022 14:46:14 -0500
Received: from localhost (unknown [76.135.104.211])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 510E3FA0E3;
 Wed, 16 Nov 2022 19:46:06 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net;
 s=mail; t=1668627966;
 bh=c/jJK1DCN2zhN/69wfQ+YwZTE7cwvFnC3sYHnoyaGvg=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=w2g7yvoK2Vc5dGgo3PcmIYH2QUICvGfEtE1dOhy0jvynV4i0zUhaUsFvNgCh335Sk
 oNwTVlxBFzTk/vxJCXSKzGNlDMw1VJrWSw8NSI93kyX4chDOZwbGqdPwfvmU013Di+
 s9ot8cnWV8j/5nCzCcAcV3ZcJBWVHGz1U4X0B9Q4=
From: Eric Abrahamsen <eric@HIDDEN>
To: Thomas Fitzsimmons <fitzsim@HIDDEN>
Subject: Re: bug#59314: 29.0.50; EUDC and message-mode header completion
In-Reply-To: <m3iljeemj5.fsf@HIDDEN> (Thomas Fitzsimmons's message of
 "Wed, 16 Nov 2022 14:18:06 -0500")
References: <87a64q7p25.fsf@HIDDEN> <m3iljeemj5.fsf@HIDDEN>
Date: Wed, 16 Nov 2022 11:46:00 -0800
Message-ID: <878rka1y4n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59314
Cc: Alexander Adolf <alexander.adolf@HIDDEN>,
 59314 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


On 11/16/22 14:18 PM, Thomas Fitzsimmons wrote:
> Hi Eric,
>
> Thanks for filing this.
>
> Eric Abrahamsen <eric@HIDDEN> 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.
>
> I just checked and I didn't think the recent patch I pushed,
> 0e25a39e6..., should have affected completion-at-point-functions.  It
> did change the default of eudc-server-hotlist from `nil' to
> `(("localhost" . ecomplete) ("localhost" . mailabbrev))".  I thought
> that should only affect EUDC users who have not customized
> eudc-server-hotlist.
>
> `eudc-capf-complete' was added to `message-mode' in commit
> 620ac6735...  I'm pretty sure that commenting out this line in
> message.el will restore prior behaviour, but I don't yet know what prior
> behaviour should be (see below).
>
> (add-hook 'completion-at-point-functions #'message-completion-function nil t)
>
>> 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))))
>>
>> Someone else *not* using corfu reported that that didn't work for them.
>> Dunno.
>
> I'm not sure what the out-of-the-box behaviour here is meant to be.  Can
> you make a recipe starting from "emacs -Q" (including adding dummy email
> addresses somewhere) that makes completion work how you want it to?  For
> me:
>
> emacs -Q
> C-x m TAB
>
> inserts four spaces and prints in *Messages*:
>
> Loading eudcb-ecomplete...done
> Loading eudcb-mailabbrev...done
>
> (Those are new, due to 0e25a39e6... but I thought should be harmless.)

Yuck, it's been a long time since I looked at this...

In emacs -Q, message-mode `completion-at-point-functions' is:

(eudc-capf-complete message-completion-function t)

Actually that's what it is in my regular Emacs, as well. All I'd need
for EBDB (and BBDB and everything else) is for
`message-completion-function' to get called, which it isn't. I believe
you could allow this by having `eudc-capf-complete' return nil, or have
`eudc-capf-message-expand-name' return a `(list beg end <table>)'
structure that includes the prop `:exclusive 'no' at the end of it. That
would allow a fallthrough to the next function.

In fact this whole message-mode thing is an impossible tangle, burritos
within burritos, and it would be great to get rid of it altogether.

`message-completion-function' already looks at where it is in the
message buffer, and calls `message-expand-name' if it's in a "name"
header. That function consults `message-expand-name-databases', and
*that's* where EBDB should put its completion table, except
`message-expand-name-databases' is hardcoded to (or 'eudc 'bbdb) for no
reason.

So I need to clobber `message-expand-name' altogether.

And EUDC having a function on `completion-at-point-functions' is
wrapping yet another burrito outside the existing burritos, because now
EUDC has a completion function both inside and outside message-mode's
own completion machinery.

In fact the docstring of `eudc-capf-message-expand-name' makes it sound
like it thinks it's being called as part of `message-expand-name', but
now it isn't -- it's being called as part of the capf machinery. Or
rather, it could potentially be called in both places.

I think a half-stick of dynamite is the only real solution.

Eric




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59314; Package emacs. Full text available.

Message received at 59314 <at> debbugs.gnu.org:


Received: (at 59314) by debbugs.gnu.org; 16 Nov 2022 19:18:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 16 14:18:15 2022
Received: from localhost ([127.0.0.1]:58182 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovNvL-0005Od-3N
	for submit <at> debbugs.gnu.org; Wed, 16 Nov 2022 14:18:15 -0500
Received: from mail.fitzsim.org ([69.165.165.189]:49668)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <fitzsim@HIDDEN>) id 1ovNvJ-0005ON-Oj
 for 59314 <at> debbugs.gnu.org; Wed, 16 Nov 2022 14:18:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fitzsim.org
 ; s=20220430;
 h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=M/eviBsvZTG7QXaPQPaIerasr7KuUGCWdokGv1f0ZvQ=; b=kbc8hpQv5sXd0Ya6WVaEf6R9+f
 bS6k65vYZh47ljaBzDZ+Qy0aVOZA+o5DW1TRg8FXB6HDaK2w37SeAnHKnOd3UDynOeZofzEzk11jq
 Qh++Pv4EUTDvhtjIzQ5ZDWXMmWGdWpZ57h3+5CK9hkAmO+Bzwkl212Sh1acqBzy/44FtV+lN9VECc
 QCtzvLdi3e6KRigZW2dUDOwWKKJEjOMBEkPvYiybdoIwAkaZX18WyD2I3ky/Z7fuVHlZ1ybx4wWpX
 kdsdL7RTCWd98NCXdNn9nS8mXJmoD4Uipx4WRh6ZkLSejpa4ujo332rcXZum43LLwIZW+Vm3bx387
 G43oYmSQ==;
Received: from [192.168.1.1] (helo=localhost.localdomain)
 by mail.fitzsim.org with esmtpsa (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2)
 (envelope-from <fitzsim@HIDDEN>)
 id 1ovNvD-000D4t-4t; Wed, 16 Nov 2022 14:18:07 -0500
From: Thomas Fitzsimmons <fitzsim@HIDDEN>
To: Eric Abrahamsen <eric@HIDDEN>
Subject: Re: bug#59314: 29.0.50; EUDC and message-mode header completion
In-Reply-To: <87a64q7p25.fsf@HIDDEN> (Eric Abrahamsen's message of
 "Wed, 16 Nov 2022 10:05:22 -0800")
References: <87a64q7p25.fsf@HIDDEN>
Date: Wed, 16 Nov 2022 14:18:06 -0500
Message-ID: <m3iljeemj5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 59314
Cc: Alexander Adolf <alexander.adolf@HIDDEN>,
 59314 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Eric,

Thanks for filing this.

Eric Abrahamsen <eric@HIDDEN> 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.

I just checked and I didn't think the recent patch I pushed,
0e25a39e6..., should have affected completion-at-point-functions.  It
did change the default of eudc-server-hotlist from `nil' to
`(("localhost" . ecomplete) ("localhost" . mailabbrev))".  I thought
that should only affect EUDC users who have not customized
eudc-server-hotlist.

`eudc-capf-complete' was added to `message-mode' in commit
620ac6735...  I'm pretty sure that commenting out this line in
message.el will restore prior behaviour, but I don't yet know what prior
behaviour should be (see below).

(add-hook 'completion-at-point-functions #'message-completion-function nil t)

> 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))))
>
> Someone else *not* using corfu reported that that didn't work for them.
> Dunno.

I'm not sure what the out-of-the-box behaviour here is meant to be.  Can
you make a recipe starting from "emacs -Q" (including adding dummy email
addresses somewhere) that makes completion work how you want it to?  For
me:

emacs -Q
C-x m TAB

inserts four spaces and prints in *Messages*:

Loading eudcb-ecomplete...done
Loading eudcb-mailabbrev...done

(Those are new, due to 0e25a39e6... but I thought should be harmless.)

Thanks,
Thomas




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#59314; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Nov 2022 18:05:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 16 13:05:36 2022
Received: from localhost ([127.0.0.1]:58074 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ovMn2-0001Iv-Du
	for submit <at> debbugs.gnu.org; Wed, 16 Nov 2022 13:05:36 -0500
Received: from lists.gnu.org ([209.51.188.17]:58852)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1ovMmx-0001Ij-5U
 for submit <at> debbugs.gnu.org; Wed, 16 Nov 2022 13:05:34 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eric@HIDDEN>)
 id 1ovMmv-00089A-C4
 for bug-gnu-emacs@HIDDEN; Wed, 16 Nov 2022 13:05:30 -0500
Received: from mail.ericabrahamsen.net ([52.70.2.18])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eric@HIDDEN>)
 id 1ovMmt-0006F1-Nu
 for bug-gnu-emacs@HIDDEN; Wed, 16 Nov 2022 13:05:29 -0500
Received: from localhost (unknown [76.135.104.211])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 026BEFA0E3
 for <bug-gnu-emacs@HIDDEN>; Wed, 16 Nov 2022 18:05:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net;
 s=mail; t=1668621924;
 bh=DAKqo3OWjAujnBQnl+I42K2XabDsCg6Liq0TEiY8mLY=;
 h=From:To:Subject:Date:From;
 b=qwgqmV4H++PrAIrM1Ok9RvQz2Ag+ZGlWzhC/FISoBMawcqDQk0fpdPR10lkC3BX8d
 hA5SMfrtc8zoPkqoDIHEC7hCX+LU1Iwt8sNMZurOoGGdeJEaDsRgKCarLKFch0vZiS
 Pcm8uDwCE3CLQuMuO04BDwJz7nFrGSo1wTVv7MJ0=
From: Eric Abrahamsen <eric@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.50; EUDC and message-mode header completion
X-Debbugs-Cc: fitzsim@HIDDEN
Date: Wed, 16 Nov 2022 10:05:22 -0800
Message-ID: <87a64q7p25.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@HIDDEN;
 helo=mail.ericabrahamsen.net
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


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

Someone else *not* using corfu reported that that didn't work for them.
Dunno.

Eric




Acknowledgement sent to Eric Abrahamsen <eric@HIDDEN>:
New bug report received and forwarded. Copy sent to fitzsim@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to fitzsim@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#59314; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 17 Nov 2022 02:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.