Gnus development mailing list
 help / color / mirror / Atom feed
* Aliases with mailing lists
@ 2021-12-03  1:07 Bob Newell
  2021-12-03 17:43 ` Bob Newell
  2021-12-03 18:12 ` Emanuel Berg
  0 siblings, 2 replies; 29+ messages in thread
From: Bob Newell @ 2021-12-03  1:07 UTC (permalink / raw)
  To: ding

Aloha,

I use aliases and set up gnus-alias-identity-rules to select
certain identities when mailing to or from certain addresses,
and when I do tab completion on an email address, the correct
identity naturally gets chosen as expected.

However, when I have a mailing list, and press space to expand
the mailing list, a different mechanism, namely abbrevs, is
used. So there is no identity selection based on the members
of the mailing list.

I'm trying to make this work to select identity, and have been
trying hacks in mailabbrev.el, where the action seems to take
place in mail-abbrev-expand-wrapper. I think I might be able
to get it to work, but the real question is, should this be
built-in to gnus somehow?

(I realize there is an issue with possible multiple
matches. But that issue already exists when doing a wide
reply, and it seems that the first rule to match wins the
battle.)

Mahalo in advance,

-- 
Bob Newell
Honolulu, Hawai`i

- Via GNU/Linux/Emacs/Gnus/BBDB


^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: Aliases with mailing lists
@ 2021-12-06 17:53 Eric Abrahamsen
  2021-12-06 18:40 ` Emanuel Berg
                   ` (2 more replies)
  0 siblings, 3 replies; 29+ messages in thread
From: Eric Abrahamsen @ 2021-12-06 17:53 UTC (permalink / raw)
  To: ding

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



^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2021-12-09 16:59 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-03  1:07 Aliases with mailing lists 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
2021-12-06 17:53 Eric Abrahamsen
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

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).