emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] EUDC email addresses via completion-at-point in message-mode


From: Stefan Monnier
Subject: Re: [PATCH] EUDC email addresses via completion-at-point in message-mode
Date: Thu, 14 Apr 2022 10:02:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> I am trying to limit the cases where eudc-capf-complete "kicks in" to
> those where I think it can be assumed that its results will quite
> certainly desirable. The reason is that completion-at-point works along
> the functions in completion-at-point-functions, and stops when the first
> function returns a completion table. Thus, by calling eudc-capf-complete
> too "aggressively", more useful completion results may be prevented from
> being offered to the user.

Maybe EUDC shouldn't be in charge of providing a CAPF function.
The CAPF function needs to understand the current document's syntax to
know where an email address is expected, but that part is completely
unrelated to EUDC itself (and related to the major mode instead).

E.g. `ecomplete.el` doesn't provide a CAPF function, instead it only
provide a completion table and relies on relevant major modes to provide
a CAPF function that internally uses `ecomplete-completion-table`.

This is used in `message.el` by calling this function from
`message--name-table` which is the function that tries to combine the
various possible backends.

The decision of when/where to use `message--name-table` is made by
`message-completion-alist`.

Side note: `message-expand-name` may call currently (depending on
circumstances) things like `eudc-expand-inline`, `bbdb-complete-name`,
or `expand-abbrev` but this is deprecated and we should get rid of this
part of its code (i.e. move the parts that may still be missing to
`message--name-table`).

We may also want to change `message--expand-name` so that backends
can be added to it without changing its code.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]