Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: Aliases with mailing lists
Date: Mon, 06 Dec 2021 09:53:54 -0800	[thread overview]
Message-ID: <875ys1ei19.fsf@ericabrahamsen.net> (raw)

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> On Friday,  3 Dec 2021 at 10:43, Eric Abrahamsen wrote:
>> If your Emacs is recent and you have the option
>> `message-expand-name-standard-ui', try setting it to t and see what that
>> does.
>
> I am trying this out (having been using bbdb-handy up to now).  I cannot
> quite figure out what it is doing.  I use bbdb as my address book.  Mail
> aliases from bbdb work just fine (typing "somealias SPC") but tab
> completion is strange.  It works, in the sense that if I type "somename
> TAB", I get a completion list.  However, it is unclear where the
> contents of this list are coming from.
>
> TAB is bound to message-tab which then invokes message-expand-name which
> should be checking bbdb but it does not appear to (or is missing many
> entries from bbdb).
>
> Any pointers or clarifications would be welcome.

Ha, you sort of called my bluff here, I hadn't looked closely at what
that option is actually doing. Basically, in a perfect world, <TAB> in a
name/group header would call `completion-at-point' directly. Programs
that want to provide names and addresses for completion would push their
tables onto `completion-at-point-functions'. The nice thing about this
is that there are several user options that would govern how completion
works (giving you more control), and also multiple backends can put
their tables in, meaning that you could cycle through completions that
come from various packages.

At present things have gotten fairly convoluted. If you set
`message-expand-name-standard-ui' to t, what happens is: `message-tab'
calls `completion-at-point', which finds `message-completion-function'
and calls that, which sees that we're in a "To:" header and ends up
calling `message-expand-name'. `message-expand-name' sees that
`message-expand-name-standard-ui' is t, and returns the standard set of
capf data, including `message--name-table' as the completion table. This
table simply does what `message-expand-name' otherwise does directly:
checks if we're using eudc or bbdb (*EBDB maintainer wipes away a
tear*), and calls `message--bbdb-query-with-words' which, god willing
and the creek don't rise, ends up with the same result as if
`message-expand-name-standard-ui' were nil, and we'd called
`bbdb-complete-name'.

Apologies if that's more detail than you wanted; I'm also trying to make
sense of this myself.

The point being, it *ought* to behave the same way, just with
(potentially) more completion candidates from multiple backends, and
more user control over the completion style. If you're seeing wrong
completions from BBDB, that means that `message--bbdb-query-with-words'
is not doing the same job as `bbdb-complete-name', and that should be
considered a bug, I guess.

Whew.

Eric



             reply	other threads:[~2021-12-06 17:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 17:53 Eric Abrahamsen [this message]
2021-12-06 18:40 ` Emanuel Berg
2021-12-06 18:46   ` Emanuel Berg
2021-12-07 11:22 ` Eric S Fraga
2021-12-07 12:41 ` Eric S Fraga
2021-12-08 17:46   ` Eric Abrahamsen
2021-12-09 16:59     ` Eric S Fraga
  -- strict thread matches above, loose matches on Subject: below --
2021-12-03  1:07 Bob Newell
2021-12-03 17:43 ` Bob Newell
2021-12-03 18:43   ` Eric Abrahamsen
2021-12-03 20:45     ` Emanuel Berg
2021-12-04 12:57       ` Byung-Hee HWANG
2021-12-04 13:17         ` Emanuel Berg
2021-12-05 12:19           ` Byung-Hee HWANG
2021-12-05 18:15             ` Emanuel Berg
2021-12-06  4:56               ` Byung-Hee HWANG
2021-12-06  5:37                 ` Byung-Hee HWANG
2021-12-03 21:28     ` Bob Newell
2021-12-03 22:21       ` Bob Newell
2021-12-04  0:38         ` Eric Abrahamsen
2021-12-05 11:42     ` Eric S Fraga
2021-12-03 18:12 ` Emanuel Berg
2021-12-05 12:42   ` Eric S Fraga
2021-12-05 18:12     ` Emanuel Berg
2021-12-05 20:42       ` Eric S Fraga
2021-12-05 21:30         ` Emanuel Berg
2021-12-05 22:07           ` Eric S Fraga
2021-12-06  2:29             ` Emanuel Berg
2021-12-06 11:05           ` Emanuel Berg

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=875ys1ei19.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=ding@gnus.org \
    /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.
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 NNTP newsgroup(s).