From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wCLbLZCIMGIApAAAgWs5BA (envelope-from ) for ; Tue, 15 Mar 2022 13:37:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KL52KpCIMGILbAEAauVa8A (envelope-from ) for ; Tue, 15 Mar 2022 13:37:36 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3780A2780B for ; Tue, 15 Mar 2022 13:37:36 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 3697C5F6C2; Tue, 15 Mar 2022 12:37:33 +0000 (UTC) Received: from smtprelay08.ispgateway.de (smtprelay08.ispgateway.de [134.119.228.98]) by mail.notmuchmail.org (Postfix) with ESMTPS id 778015F5E2 for ; Tue, 15 Mar 2022 12:37:30 +0000 (UTC) Received: from [46.244.214.3] (helo=condition-alpha.com) by smtprelay08.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nU6QX-00006O-ES; Tue, 15 Mar 2022 13:37:25 +0100 Message-Id: <389f3bb5fbbf532ce8e6ba0dc25c8e97@condition-alpha.com> From: Alexander Adolf To: Utkarsh Singh Subject: Re: [PATCH] emacs: Add more front ends for address completion In-Reply-To: <87ee36v7ax.fsf@gmail.com> References: <87bkzhbez9.fsf@gmail.com> <115f4649ac25dff4073a32dba70e6db7@condition-alpha.com> <87wnhfjrer.fsf@gmail.com> <871qzfzgic.fsf@gmail.com> <3444ac96512ebdb53fb1faf90a2db263@condition-alpha.com> <87k0d4n8tr.fsf@gmail.com> <87ee3clysa.fsf@gmail.com> <87ee36v7ax.fsf@gmail.com> Date: Tue, 15 Mar 2022 13:37:28 +0100 MIME-Version: 1.0 X-Df-Sender: YWxleGFuZGVyLmFkb2xmQGNvbmRpdGlvbi1hbHBoYS5jb20= Message-ID-Hash: EJ6MVAXCOLLONVLCREJDLIIOWT35XN22 X-Message-ID-Hash: EJ6MVAXCOLLONVLCREJDLIIOWT35XN22 X-MailFrom: alexander.adolf@condition-alpha.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Notmuch mailing list X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1647347856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=331v2qt1rYypRmpv3JS9aK1I2vYVfgLd6NgdeIRjRh0=; b=VmJZzU7Z+KkBpsztE8JKaRuth+kty6xpGGqFPkm3MKqame20kZGE72hqZDzrOGJMd4YyK1 wwdkPbZ232k0Hb1c4gVCmTHGFs6Fr2GFaTHCC8OQL2/vdPMQxyPsdYLSandWftyu35UFG4 cIReAM7REBZnsRhW050FBszspWpCD6BNwPVMZlBONPVOLtBLc1lroJLZabyz485QUgm8ft iuvtvstJUdp9ismKdn0TByMb5YlOAKU9YxYjps3tTjW0pvxXYzLxznXeJ6CGAesb3GvB5A 6cLCb6mcs69u/z5SusZOqluuLMXzzPpTDMoX4DLLRtpexwPEYzZa7tWOQDJryA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1647347856; a=rsa-sha256; cv=none; b=Ex9Et+9Q71uifl4sFAO+oPn9mEpbB0tMXtdH8jD/3R1jfz0FLkb+T1hJC+K+B7DmkVJna1 2CtRJRzqiGW+rOaH3wAVUCj9pfpLPOHN7HArCj/DIwxKBl32izwghaoAtU5nuMPC9LGA/H 9H5qJmI9ighrEfkK9AxWADidcUzrukZp8v5jI7sPvB7XMtW3QFTOhty/N3pchBDlw7aKBj phms2FiWITKRim8rX8LMzZ/SnG5k+j2q7p7WLIFOQFp4ZwAcTwMPOnSunTumnjHyZNPPw/ QGRW28ls1+x57qu56vYe69vk21T7gh+96NRAndzln9xx5C3h9MrisQm4EWhoQw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -3.18 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 3780A2780B X-Spam-Score: -3.18 X-Migadu-Scanner: scn0.migadu.com X-TUID: V1jhCPUIstoe Utkarsh Singh writes: > [...] >>> `post-completion': Called after a completion candidate has been inserted >>> into the buffer. The second argument is the candidate. Can be used to >>> modify it, e.g. to expand a snippet. >>> [...] >> >> Hm, that sounds like it would functionally be similar to specifying an >> :exit-function property in completion-extra-properties? > > Great! We can definitely work with this. > [...] I'm glad to learn we might be heading in the same direction. AFAIR you spoke about removing company from notmuch-address.el altogether? That would be by impetus, too. EUDC [1], which is part of core Emacs, has just been given the ability to combine search results from several sources [2]. [1] https://www.gnu.org/software/emacs/manual/html_mono/eudc.html [2] https://github.com/emacs-mirror/emacs/commit/0470a4a939772c4bd25123b15f5eadab41f8bee5 I have written experimental code to make EUDC contribute to completion-at-point, and to make notmuch-address contribute to EUDC search results. This works in principle, and I get combined search results from notmuch-address, and the macOS Contacts app in a corfu pop-over UI in header fields of message-mode. It seems you were looking for something similar? With this kind of setup, the overall architecture for email address completion could be like this: notmuch-address \ BBDB | LDAP > --> EUDC --+ macOS Contacts | | ... / V | +----------<-------------+ | V / completing-read | | corfu + --> completion-at-point --> < company | ... \ This would remove any user interface related code from notmuch-address.el, an instead convert it into a back-end for EUDC. Looking forward to your thoughts, --alexander