Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: ding@gnus.org
Subject: Re: In-buffer completion of EBDB mail addresses with corfu
Date: Fri, 20 Oct 2023 08:08:13 -0700	[thread overview]
Message-ID: <87wmvh72n6.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <m234y5vlru.fsf@macmutant.fritz.box>

Arash Esbati <arash@gnu.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> I'm not completely clear what you're doing here -- you enter a full name
>> and email, then a comma, then TAB? EBDB will only look back as far as
>> the nearest comma for completion. In this case it will send in a blank
>> string, which should offer all emails in your EBDB database for
>> completion. 
>
> I think we can skip this (see below).
>
>> Have you created any records?
>
> Yes.
>
>> Are there strings in `ebdb-dwim-completion-cache'?
>
> Thanks, this is it.  It was nil.  If I do `M-x ebdb RET RET' to see my
> records and then hit 'q', `ebdb-dwim-completion-cache' seems to get
> populated and then hitting TAB in the header in Message mode offers
> in-buffer completion.  Is there a way to automate the setting of
> `ebdb-dwim-completion-cache'?

There are "is EBDB loaded" guards around every entrypoint I could think
of, except this! Luckily that's not hard to fix.

>> That's not a bad idea. Having them `require' libraries to activate
>> behavior isn't very Emacsy.
>
> Agreed.  And that was the reason I made that suggestion.
>
>> That would be a pretty annoying change for existing users, though...
>
> Are these two approaches mutually exclusive?  Users who want to
> `require' it can still do it, and others can load the package lazily if
> the autoload cookies are added.  Or am I missing something?

Yes, I suppose you're right. `add-hook' is idempotent, so no harm done
if that ends up getting called twice. And the "insinuate" functions are
a fine place to make sure that `ebdb-load' is called.

I don't think there should be anything complicated about that, I'll play
with it and release a new version soon.

Thanks!
Eric



  reply	other threads:[~2023-10-20 15:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 20:24 Arash Esbati
2023-10-19  4:14 ` Eric Abrahamsen
2023-10-19  7:14   ` Arash Esbati
2023-10-19 14:29     ` Eric Abrahamsen
2023-10-20  6:41       ` Arash Esbati
2023-10-20 15:08         ` Eric Abrahamsen [this message]
2023-10-21  9:09           ` Arash Esbati
2023-10-21 18:32             ` Eric Abrahamsen

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=87wmvh72n6.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).