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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27161 invoked from network); 8 Dec 2021 17:47:26 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 8 Dec 2021 17:47:26 -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.94.2) (envelope-from ) id 1mv12I-00243N-9V for ml@inbox.vuxu.org; Wed, 08 Dec 2021 11:47:22 -0600 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94.2) (envelope-from ) id 1mv12H-001ayi-HO for ml@inbox.vuxu.org; Wed, 08 Dec 2021 11:47:21 -0600 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtp (Exim 4.94.2) (envelope-from ) id 1mv12G-001ayc-Ka for ding@lists.math.uh.edu; Wed, 08 Dec 2021 11:47:20 -0600 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.94.2) (envelope-from ) id 1mv12E-00B3DN-DP for ding@lists.math.uh.edu; Wed, 08 Dec 2021 11:47:20 -0600 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=voQ/IhNW6a01PITgMiBbr1jBJ6et2IARq8/ZIWSfUUk=; b=E0sj8GlOVbqjAeA0w+SmS9lVLk WC++rfMrcQMzLClIvXbD8rUVmhkwgqU/V5F9jAGpRjvRR5f1SW9BP7aAuOwaC04XfEX5X/U6eTwLB JAY6NeeOm/25yAdaQQBHuDJ5DqFacsNKAPvWkplPOOFWxymjX9wGg5bqE/rpLch+Wi+s=; 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 1mv125-0002U7-Vj for ding@gnus.org; Wed, 08 Dec 2021 18:47:12 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mv123-0003Ge-CW for ding@gnus.org; Wed, 08 Dec 2021 18:47:07 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Eric Abrahamsen Subject: Re: Aliases with mailing lists Date: Wed, 08 Dec 2021 09:46:49 -0800 Message-ID: <874k7j56ra.fsf@ericabrahamsen.net> References: <875ys1ei19.fsf@ericabrahamsen.net> <874k7kegdk.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:+ObqmuEppWv2zgZ03rU2xDkcx1c= List-ID: Precedence: bulk Eric S Fraga 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.