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=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28386 invoked from network); 19 Oct 2023 14:29:40 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 19 Oct 2023 14:29:40 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96.1) (envelope-from ) id 1qtU1l-000xGN-0P for ml@inbox.vuxu.org; Thu, 19 Oct 2023 09:29:33 -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 1qtU1k-0004Yy-1O for ml@inbox.vuxu.org; Thu, 19 Oct 2023 09:29:32 -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 1qtU1X-0004Yp-1r for ding@lists.math.uh.edu; Thu, 19 Oct 2023 09:29:29 -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 1qtU1W-000xWk-00 for ding@lists.math.uh.edu; Thu, 19 Oct 2023 09:29:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=K4IK595dYGPgAg5BOKMT4Mt5CkFKi6ar+pgEcvEHUnY=; b=Q1bP+qNfne6qFLUyQHi4ZO2M/c hVRSYOlRsxFGF1OuBdQjbvsfmKqXD5+NOqZEvHjVyDTcJeUcZZ2lyMSClvpS4PuSgF4bflYGVO1mH F34CIwQPqc2UYer4M/voFojpUQfWPkemb45sgLBy3etC0wyaKddBgb8QMkr68TNAboXw=; Received: from mail.ericabrahamsen.net ([52.70.2.18]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qtU1P-0005X6-BI for ding@gnus.org; Thu, 19 Oct 2023 16:29:13 +0200 Received: from localhost (71-212-21-65.tukw.qwest.net [71.212.21.65]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 0F50AFA096; Thu, 19 Oct 2023 14:29:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1697725749; bh=K4IK595dYGPgAg5BOKMT4Mt5CkFKi6ar+pgEcvEHUnY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FcHHoUW+brBAAxC7VEqexgN+5mVcP2o4M04bZTcNJYvhHbmrQQHNV2RyrBYlyyxzt UlayMV6gOuTZKXCD5aGDDzK69un1+fUaUraCgRuJ2uuls3W/cyoHvwsfEoOXV9parO 4JSWhHQ9DeEy7hRRzEdp35lkQP/8FWoz3yfruCwM= From: Eric Abrahamsen To: Arash Esbati Cc: ding@gnus.org Subject: Re: In-buffer completion of EBDB mail addresses with corfu In-Reply-To: (Arash Esbati's message of "Thu, 19 Oct 2023 09:14:22 +0200") References: <87bkcv9rl1.fsf@ericabrahamsen.net> Date: Thu, 19 Oct 2023 07:29:07 -0700 Message-ID: <87sf668z4c.fsf@ericabrahamsen.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Arash Esbati writes: > Eric Abrahamsen writes: > >> The other option is to set (the variable) `ebdb-complete-mail' to the >> symbol 'capf. This will put a pre-defined list of "name " strings >> into the completion-at-point-functions hook. Then TAB should offer those >> strings for completion, using corfu. >> >> The search is less powerful because it doesn't use a dynamic lookup, but >> it should still be fine to use. >> >> Let me know how that works! > > Thanks for your response. I added > > (setq ebdb-complete-mail 'capf) > > to my .gnus, but I think this is not enough. IIUC, I need: > > (setq ebdb-complete-mail 'capf) > (require 'ebdb-message) > > Then this is the value of `completion-at-point-functions' in this > buffer: > > completion-at-point-functions is a variable defined in =E2=80=98minibuf= fer.el=E2=80=99. > > Its value is > (ebdb-mail-dwim-completion-at-point-function > message-completion-function t) > > Now I hit 'C-c C-f C-t' and enter ', TAB' after your "name " and > get some space added with "No match" in the echo area. So it doesn't > seem to work. Or am I missing something? 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. Have you created any records? Are there strings in `ebdb-dwim-completion-cache'? > And while we're at it: I suggest to autoload the functions > `ebdb-insinuate-message', `ebdb-insinuate-mail' and > `ebdb-message-auto-update' and let users add things like: > > (add-hook 'message-mode-hook #'ebdb-insinuate-message) > (add-hook 'message-send-hook #'ebdb-message-auto-update) > > (add-hook 'mail-setup-hook #'ebdb-insinuate-mail) > (add-hook 'mail-send-hook #'ebdb-message-auto-update) > > to their init file, depending on what they're using. That's not a bad idea. Having them `require' libraries to activate behavior isn't very Emacsy. That would be a pretty annoying change for existing users, though...