all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alexander Adolf <alexander.adolf@condition-alpha.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Thoughts on Refactoring In-Buffer Completion In message.el
Date: Fri, 22 Jul 2022 15:20:31 +0200	[thread overview]
Message-ID: <e20052b75483d236e468b183719faa95@condition-alpha.com> (raw)
In-Reply-To: <jwvk087jq3p.fsf-monnier+emacs@gnu.org>

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> [...]
> A "completion table" can take several shapes, one of which is
> a function.
> [...]

That clarifies, thanks. We're on the same page.

Now I _think_ I understood a little better where you seem to be heading.
It appears your (as of yet not explicitly described) goal is to have a
collection of message--name-table type things in message.el, and
depending on the completion context plug the corresponding one of them
into at (list beg end collection) construct, which is then returned by
message-completion-function?

One of the added values of message--name-table seems to be the
marshalling of, and the merging of results from, the different
completion sources (eudc, bbdb, and ecomplete; not mailabbrev though?).

EUDC has recently gained the ability to do multi-server queries, and
deliver the combined results from all servers, and it was hence my idea
that this marshalling/merging functionality could now conveniently be
outsourced from message.el to EUDC. There is a bbdb back-end for EUDC
already, and I have back-ends for ecomplete and mailabbrev sitting on my
hard drive. I.e. there would not be any "degradation" in terms of
end-user functionality (same set of completion candidates as before),
and additional sources like e.g. LDAP, and macOS Contacts would become
available "for free" by calling eudc-query-with-words with its new
TRY-ALL-SERVERS parameter set to t.

It would seem that quite a couple of lines of code could be "commented
out" of message.el under `(if (<= emacs-major-version 29) ...)` as a
result of such a change.

Also, message.el would no longer need to deal with any completion UI
issues, and any completion UI related code in ecomplete, and mailabbrev
would no longer be used.

Another thing to look at would seem the "harvesting" of email addresses.
Today, there is support for ecomplete in message.el. It might be just as
(more?) appropriate to provide a new hook for this? Along the lines of
what is now in message-put-addresses-in-ecomplete, instead of a
hard-coded call to ecomplete, user-provided hook functions could be
called for each header.

At the end of the day, message.el would be completely independent of
what databases people use, or don't use. It would interface with EUDC
only, and leave "address harvesting" to user functions called from a new
message send hook.


Many thanks and looking forward to your thoughts,

  --alexander



  reply	other threads:[~2022-07-22 13:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 15:26 Thoughts on Refactoring In-Buffer Completion In message.el Alexander Adolf
2022-06-25  4:35 ` Thomas Fitzsimmons
2022-06-27 15:48   ` Alexander Adolf
2022-06-25  8:22 ` Stefan Monnier
2022-06-27 16:37   ` Alexander Adolf
2022-06-28 15:49     ` Stefan Monnier
2022-07-19 21:41       ` Alexander Adolf
2022-07-19 22:13         ` Stefan Monnier
2022-07-20 20:59           ` Alexander Adolf
2022-07-20 23:59             ` Stefan Monnier
2022-07-22 13:20               ` Alexander Adolf [this message]
2022-07-22 13:58                 ` Alexander Adolf
2022-07-27 21:16               ` Alexander Adolf
2022-08-17  2:45                 ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2022-08-13 13:11 Alexander Adolf
2022-08-17  1:54 ` Stefan Monnier

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

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

  git send-email \
    --in-reply-to=e20052b75483d236e468b183719faa95@condition-alpha.com \
    --to=alexander.adolf@condition-alpha.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.