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: Tue, 06 Dec 2022 22:14:10 -0500 Message-ID: References: <87a64q7p25.fsf@ericabrahamsen.net> <878rka1y4n.fsf@ericabrahamsen.net> <9cad334f4f42725f2e244c8c81528856@condition-alpha.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26362"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eric Abrahamsen , 59314@debbugs.gnu.org To: Alexander Adolf Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 07 04:15:32 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 1p2kuA-0006ZW-JE for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Dec 2022 04:15:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2ktt-0005ed-R6; Tue, 06 Dec 2022 22:15:13 -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 1p2ktj-0005dG-2A for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 22:15: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 1p2kti-0005Fw-MZ for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 22:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2kti-0003hU-5m for bug-gnu-emacs@gnu.org; Tue, 06 Dec 2022 22:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Thomas Fitzsimmons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Dec 2022 03:15:02 +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.167038286114204 (code B ref 59314); Wed, 07 Dec 2022 03:15:02 +0000 Original-Received: (at 59314) by debbugs.gnu.org; 7 Dec 2022 03:14:21 +0000 Original-Received: from localhost ([127.0.0.1]:46834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2kt3-0003h2-8Y for submit@debbugs.gnu.org; Tue, 06 Dec 2022 22:14:21 -0500 Original-Received: from mail.fitzsim.org ([69.165.165.189]:55896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2ksz-0003gv-Fl for 59314@debbugs.gnu.org; Tue, 06 Dec 2022 22:14:20 -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=0Hvsfg+QdC2lqfk45YiZyk8jUU++eHcTSMmlL8rPNd8=; b=lxgnNbOhQE60uaq1TrhXQoeej/ SpJTLBaqMxiRUUqU46lVFI48402F5LpaOo7UvcEaFMLk2VeBYqShJenIS5NDabheKWzZhkfH5Wnls Fy+CBwz26dKWj8ItHkbNjRP1/BjxTxwtcIh+DDrfjjIDAvRxTtc2BcRkUTJEgzkw9BqwqaYLYyp+Q QsOXa4LCLHp+eVhLSJ2PSGHubvtqOXi1hteXEQLKGiuXB2Km0mCSZmBgcFwGmo0VSo0K7viBayHI6 80O8BdUExKh63IXhupDYZpGvqHTJ4pPWQsnAqryURKwC7cv92IYABRVjzmzLksOZ1DB0IWP3uGBmS lgjht6Ug==; 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 1p2kss-00039e-UH; Tue, 06 Dec 2022 22:14:11 -0500 In-Reply-To: (Thomas Fitzsimmons's message of "Tue, 06 Dec 2022 20:51:13 -0500") 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:250160 Archived-At: Thomas Fitzsimmons writes: > Alexander Adolf writes: > >> Thomas Fitzsimmons writes: >> >>>> [...] >>>> Looking at this now. >>> >>> Great, thank you. >>> [...] >> >> With the default value of `completion-styles`, which is >> >> '(basic partial-completion emacs22) >> >> I get no completion. But when setting it to >> >> '(substring partial-completion) >> >> as I mentioned, I get this after calling `completion-at-point:` >> ---------------------------------------------------------------------- >> To: > Subject: >> From: Alexander Adolf >> --text follows this line-- >> ---------------------------------------------------------------------- >> Which I guess is kind of the expected result, as it inserts the longest >> common prefix of the two candidates' email addresses. >> >> I get the same result with `message-tab` (or just pressing TAB), btw. >> >> Actually, I think the leading "<" should not be there? After appending >> either "3", or "4" further completion attempts (using either function) >> do not provide any results. But when I remove the leading "<", and try >> to complete again (with either "3" or "4" added), I get the correct >> result (for instance "Emacs ERT4 "). >> >> Thus, it seems there are two things to further look into : >> >> - set `completion-styles` to '(substring partial-completion) during the >> test >> >> - make sure the leading "<" is not inserted when there is a partial >> match > > Confirmed, adding substring to completion-styles, anywhere in the list, e.g.: > > (setq completion-styles '(basic substring partial-completion emacs22)) > > results in the behaviour you describe. We need to make this work with > the default completion-styles setting though. > > I wonder where the leading " <" comes from (a space character is also > inserted, before the '<'). If I remove this line from message.el: (add-hook 'completion-at-point-functions #'eudc-capf-complete -1 t) and rebuild Emacs, then my recipe works, via: message-tab -...-> message-expand-name -> eudc-expand-inline The EUDC multi-selector UI is invoked allowing me to choose between emacs-ert-test-3 and emacs-ert-test-4, and the full name and email address is inserted correctly. This is with completion-styles left at its default value. So that's one code path validated, phew. The next one I'd like to get working is a similar recipe (again, with eudc-capf-complete not present in message's completion-at-point-functions): HOME=`pwd`/test emacs C-: (setq message-expand-name-standard-ui t) C-: (eudc-set-server "localhost" 'bbdb t) C-x m emacs-ertTAB Then I get "