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: Wed, 08 Dec 2021 09:46:49 -0800	[thread overview]
Message-ID: <874k7j56ra.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <874k7kegdk.fsf@ucl.ac.uk>

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

> Eric,
>
> Very strange: I get different outcomes with bbdb-complete-mail,
> message--bbdb-query-with-words, and message-tab directly.  And none of
> the outcomes corresponds to what I get with bbdb-search-name.
>
> I would like what bbdb-search-name returns... any idea how I can achieve
> this?

But `bbdb-search-name' returns actual BBDB records, right? Not mail
completion strings? I don't know `bbdb-complete-mail' well enough to say
exactly why the results vary, but at the very least `bbdb-complete-mail'
will allow you to complete on email addresses, not just record names,
which seems desirable.

You could potentially write a wrapper function that uses
`bbdb-search-name' to find records, and then mapcans `bbdb-dwim-mail'
over each record's mail addresses, and returns the result as a list of
strings. Then you'd have to force message-tab completion to use your
function.

The nuclear approach I take in EBDB is:

(cl-pushnew '("^\\(Resent-\\)?\\(To\\|B?Cc\\|Reply-To\\|From\\|Mail-Followup-To\\|Mail-Copies-To\\):" . ebdb-complete-mail)
  		 message-completion-alist
  		 :test #'equal)

You could put your own in there. 

> Ideally, what would be good is a name/email search based on Emacs's own
> completion engine (allowing for selectrum, helm, ivy, ...).
>
> thank you,
> eric
>
> PS -I guess this is not really a gnus topic; it's more about
> message-mode and maybe should be on emacs.help?

I'd actually raise this on the BBDB list: as message-mode continues to
provide for more "standard" completion behavior, BBDB should probably
provide new functions to match that. There's a code comment in
message.el to the effect that `message--bbdb-query-with-words' actually
belongs in BBDB. Maybe they'll have some opinions about this.



  reply	other threads:[~2021-12-08 17:47 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=874k7j56ra.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).