From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 27578 invoked from network); 20 Oct 2023 15:08:35 -0000 Received: from mx2.math.uh.edu (129.7.128.33) by inbox.vuxu.org with ESMTPUTF8; 20 Oct 2023 15:08:35 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96.1) (envelope-from ) id 1qtr74-001omU-0g for ml@inbox.vuxu.org; Fri, 20 Oct 2023 10:08:34 -0500 Received: from lists1.math.uh.edu ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.96.1) (envelope-from ) id 1qtr73-000AmO-2u for ml@inbox.vuxu.org; Fri, 20 Oct 2023 10:08:33 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtp (Exim 4.96.1) (envelope-from ) id 1qtr72-000AmI-1k for ding@lists.math.uh.edu; Fri, 20 Oct 2023 10:08:32 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96.1) (envelope-from ) id 1qtr71-001nZe-0l for ding@lists.math.uh.edu; Fri, 20 Oct 2023 10:08:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:Mime-Version:References:Message-ID:Date:Subject: From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TKm2uiFEcQvuZmXcnjTjEJXcISDLiwbTzmMqMqpYvl0=; b=MnXdZcAEusHDatUHNQjhOUdDKK oNR+ngoOw6H+dhpqofDqTUIWjSshnFb4/bhd7CWFddzW5oNuMRC6OEOej06qZY/oXbs4/Ih346NAd wGEzXfD8Gi7Ho7pSOGqflTEykekX7bbJQXXgMsqwMihXlJ7m4mAGhmeRwhlp6Oe1jb68=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qtr6u-0000vX-SP for ding@gnus.org; Fri, 20 Oct 2023 17:08:26 +0200 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qtr6t-0001AS-Ns for ding@gnus.org; Fri, 20 Oct 2023 17:08:23 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Eric Abrahamsen Subject: Re: In-buffer completion of EBDB mail addresses with corfu Date: Fri, 20 Oct 2023 08:08:13 -0700 Message-ID: <87wmvh72n6.fsf@ericabrahamsen.net> References: <87bkcv9rl1.fsf@ericabrahamsen.net> <87sf668z4c.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:YPOodu28c1L5q0ynGvIve+CGfgA= List-ID: Precedence: bulk Arash Esbati writes: > Eric Abrahamsen 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