From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thomas Fitzsimmons Newsgroups: gmane.emacs.bugs Subject: bug#59314: 29.0.50; EUDC and message-mode header completion Date: Wed, 16 Nov 2022 20:34:31 -0500 Message-ID: References: <87a64q7p25.fsf@ericabrahamsen.net> <878rka1y4n.fsf@ericabrahamsen.net> <87zgcqzg7s.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5284"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Alexander Adolf , 59314@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 17 02:35:38 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ovToW-000137-Ud for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 17 Nov 2022 02:35:38 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovTo4-0004u4-AM; Wed, 16 Nov 2022 20:35:08 -0500 Original-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 ) id 1ovTny-0004sE-HP for bug-gnu-emacs@gnu.org; Wed, 16 Nov 2022 20:35:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ovTny-0005Mf-7h for bug-gnu-emacs@gnu.org; Wed, 16 Nov 2022 20:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ovTnx-0002OT-Ua for bug-gnu-emacs@gnu.org; Wed, 16 Nov 2022 20:35:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2022 01:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59314 X-GNU-PR-Package: emacs Original-Received: via spool by 59314-submit@debbugs.gnu.org id=B59314.16686488829173 (code B ref 59314); Thu, 17 Nov 2022 01:35:01 +0000 Original-Received: (at 59314) by debbugs.gnu.org; 17 Nov 2022 01:34:42 +0000 Original-Received: from localhost ([127.0.0.1]:58575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovTnd-0002Nq-JR for submit@debbugs.gnu.org; Wed, 16 Nov 2022 20:34:42 -0500 Original-Received: from mail.fitzsim.org ([69.165.165.189]:46164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ovTnb-0002Nd-1f for 59314@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==; Original-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 ) id 1ovTnU-000DG6-6Y; Wed, 16 Nov 2022 20:34:32 -0500 In-Reply-To: <87zgcqzg7s.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 16 Nov 2022 14:28:55 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248066 Archived-At: Eric Abrahamsen writes: > Thomas Fitzsimmons writes: > >> Hi Eric, >> >> Eric Abrahamsen writes: >> >>> On 11/16/22 14:18 PM, Thomas Fitzsimmons wrote: >>>> Hi Eric, >>>> >>>> Thanks for filing this. >>>> >>>> Eric Abrahamsen 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 . >>>>> >>>>> `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 )' >>> 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