From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +FOsOTyRc18hKQAA0tVLHw (envelope-from ) for ; Tue, 29 Sep 2020 19:55:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QJ6MNTyRc1/rNQAA1q6Kng (envelope-from ) for ; Tue, 29 Sep 2020 19:55:40 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3A9A89402AC for ; Tue, 29 Sep 2020 19:55:39 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0E91D1FFC8; Tue, 29 Sep 2020 15:55:30 -0400 (EDT) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.31.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id A14A61FFAE for ; Tue, 29 Sep 2020 15:55:27 -0400 (EDT) Received: from [46.244.196.23] (helo=condition-alpha.com) by smtprelay03.ispgateway.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1kNLaD-0005VM-PK; Tue, 29 Sep 2020 21:46:42 +0200 Message-Id: <77f1772faeb80958552f0b93300dbbc6@condition-alpha.com> From: Alexander Adolf To: George Kadianakis , notmuch@notmuchmail.org Subject: Re: emacs: How to tab-complete destination email addresses? In-Reply-To: <87h7roa3fe.fsf@riseup.net> References: <87h7roa3fe.fsf@riseup.net> Date: Tue, 29 Sep 2020 21:46:38 +0200 MIME-Version: 1.0 X-Df-Sender: YWxleGFuZGVyLmFkb2xmQGNvbmRpdGlvbi1hbHBoYS5jb20= Message-ID-Hash: NJY43SV4R4VSKHS2V3PUQA7HIH6ODZOY X-Message-ID-Hash: NJY43SV4R4VSKHS2V3PUQA7HIH6ODZOY 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: 0.03 X-TUID: HIyvKsTWId3Y Hello George, George Kadianakis writes: > [...] > So what to do? > > One way forward is to switch from using notmuch-address to using > something like bbdb and manually curate my database (since bbdb offers > this capability). > [...] Another option is to use company [1], or any other completion framework that also offers aggregation of completion candidates from several sources. In the default configuration, company uses notmuch-address as one of its message mode back-ends. You can add other sources (e.g. bbdb) easily, if they're not included in the default config already. LDAP can also be added via EUDC [2]. [1] http://company-mode.github.io [2] https://www.gnu.org/software/emacs/manual/html_mono/eudc.html On a loosely related note: picking the "most relevant", or "best" match when there's more than one candidate address, is non-trivial. "Least recently used" is one possible heuristic, but which - when used in isolation - will likely produce misleading results. If you send a couple of messages to old addresses, as you described happened to you, that would push those old addresses up in the ranking. So I guess one would minimally also need to consider whether those addresses were sent to, or received from. But then, if someone changes their email address, any recommendation system would keep suggesting the old address for a while. Hence, the only solution that works somewhat reliably, to my experience is linking the lookup with an address book of sorts. When I update the address book with a new address, I will be presented the new address at the top of the candidate list. In short terms, my suggestion is to consider using company, and link it up with you address book application. Cheers, --alex