unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Thomas Fitzsimmons <fitzsim@fitzsim.org>
To: Alexander Adolf <alexander.adolf@condition-alpha.com>
Cc: Eric Abrahamsen <eric@ericabrahamsen.net>, 59314@debbugs.gnu.org
Subject: bug#59314: 29.0.50; EUDC and message-mode header completion
Date: Tue, 06 Dec 2022 22:14:10 -0500	[thread overview]
Message-ID: <m3edtbc3ct.fsf@fitzsim.org> (raw)
In-Reply-To: <m3mt80asmm.fsf@fitzsim.org> (Thomas Fitzsimmons's message of "Tue, 06 Dec 2022 20:51:13 -0500")

Thomas Fitzsimmons <fitzsim@fitzsim.org> writes:

> Alexander Adolf <alexander.adolf@condition-alpha.com> writes:
>
>> Thomas Fitzsimmons <fitzsim@fitzsim.org> 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:  <emacs-ert-test-
>> Subject: 
>> From: Alexander Adolf <alexanderadolf@laptop.fritz.box>
>> --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 <emacs-ert-test-4@bbdb.gnu.org>").
>>
>> 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 " <emacs-ert-test-", the same as your result, in the absence
of eudc-capf-complete.  This seems to be caused by misinterpreting the
results of eudc-query-with-words.  What is 'message--name-table'
supposed to return, what is it returning, and why is its return value
producing " <..." in the output?  I could use your input on how
completion-at-point is supposed to work here.

Thank you,
Thomas





  reply	other threads:[~2022-12-07  3:14 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 18:05 bug#59314: 29.0.50; EUDC and message-mode header completion Eric Abrahamsen
2022-11-16 19:18 ` Thomas Fitzsimmons
2022-11-16 19:46   ` Eric Abrahamsen
2022-11-16 20:54     ` Thomas Fitzsimmons
2022-11-16 22:28       ` Eric Abrahamsen
2022-11-17  1:34         ` Thomas Fitzsimmons
2022-11-17  2:04           ` Eric Abrahamsen
2022-11-17  1:16       ` Eric Abrahamsen
2022-11-17  3:32         ` Thomas Fitzsimmons
2022-11-17  3:28     ` Thomas Fitzsimmons
2022-11-18  4:21       ` Eric Abrahamsen
2022-11-19  7:42         ` Thomas Fitzsimmons
2022-11-22  0:15           ` Eric Abrahamsen
2022-11-22 15:21             ` Thomas Fitzsimmons
2022-11-24  7:24               ` Thomas Fitzsimmons
2022-11-24 22:09                 ` Eric Abrahamsen
2022-11-24  9:53             ` Thomas Fitzsimmons
2022-12-01 15:46     ` Alexander Adolf
2022-12-01 16:02       ` Eric Abrahamsen
2022-12-01 15:48     ` Alexander Adolf
2022-12-01 17:49       ` Eric Abrahamsen
2022-12-02  2:50       ` Thomas Fitzsimmons
2022-12-06 20:40         ` Alexander Adolf
2022-12-06 20:52           ` Thomas Fitzsimmons
2022-12-06 23:29             ` Alexander Adolf
2022-12-07  1:51               ` Thomas Fitzsimmons
2022-12-07  3:14                 ` Thomas Fitzsimmons [this message]
2022-12-07 22:10                   ` Alexander Adolf
2022-12-07 22:21                     ` Thomas Fitzsimmons
2022-12-08 22:34                       ` Alexander Adolf
2022-12-08 22:58                         ` Thomas Fitzsimmons
2022-12-10  1:40                           ` Alexander Adolf
2022-12-10 14:27                             ` Thomas Fitzsimmons
2022-12-12 22:10                               ` Alexander Adolf
2022-12-14  1:34                                 ` Thomas Fitzsimmons
2022-12-14 18:07                                   ` Alexander Adolf
2022-12-15  3:32                                     ` Thomas Fitzsimmons
2022-12-19 16:09                                       ` Alexander Adolf
2022-12-21 17:39                                 ` Thomas Fitzsimmons
2022-12-11 16:08                           ` Alexander Adolf
2022-12-12 12:31                             ` Thomas Fitzsimmons
2022-12-07 22:20                   ` Alexander Adolf
2023-02-11  3:30         ` Thomas Fitzsimmons
2023-01-31 13:04 ` Julien Cubizolles
2023-02-05  0:48   ` Thomas Fitzsimmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3edtbc3ct.fsf@fitzsim.org \
    --to=fitzsim@fitzsim.org \
    --cc=59314@debbugs.gnu.org \
    --cc=alexander.adolf@condition-alpha.com \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).