From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qHltAkh7qF92AgAA0tVLHw (envelope-from ) for ; Sun, 08 Nov 2020 23:12:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id WB/HOUd7qF9KAQAAB5/wlQ (envelope-from ) for ; Sun, 08 Nov 2020 23:12:07 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (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 438569402C8 for ; Sun, 8 Nov 2020 23:12:06 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 92360270EF; Sun, 8 Nov 2020 18:11:55 -0500 (EST) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id 758B0270EA for ; Sun, 8 Nov 2020 18:11:53 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id 2307A160AE for ; Mon, 9 Nov 2020 00:11:51 +0100 (CET) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail1.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id ibf24PYM4om2 for ; Mon, 9 Nov 2020 00:11:50 +0100 (CET) Received: from customer (localhost [127.0.0.1]) (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 mail.hostpark.net (Postfix) with ESMTPSA id DA4DB160DD for ; Mon, 9 Nov 2020 00:11:50 +0100 (CET) From: Jonas Bernoulli To: notmuch@notmuchmail.org Subject: [PATCH 3/3] emacs: notmuch-address-expand-name: use the actual initial-input Date: Mon, 9 Nov 2020 00:11:50 +0100 Message-Id: <20201108231150.5419-4-jonas@bernoul.li> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201108231150.5419-1-jonas@bernoul.li> References: <20201108231150.5419-1-jonas@bernoul.li> MIME-Version: 1.0 Message-ID-Hash: JDTVOZMIXULJU4UG7FPLZGZZMFEVLP5Y X-Message-ID-Hash: JDTVOZMIXULJU4UG7FPLZGZZMFEVLP5Y X-MailFrom: jonas@bernoul.li 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: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -0.01 X-TUID: 7oqM8jDxhrbC Users may type some text into the buffer on an address line, before actually invoking address completion. We now use that text as the initial input when we begin address completion. Previously we did knowingly replace the actual initial input with some completion candidate that happens to match. Which candidate is used is essentially random, at least when the actual initial input is short. As a result users very often had to begin completion by deleting the less than helpful "initial input". --- emacs/notmuch-address.el | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index 6e29b99a..591ad7ae 100644 --- a/emacs/notmuch-address.el +++ b/emacs/notmuch-address.el @@ -238,14 +238,8 @@ (defun notmuch-address-expand-name () (t (funcall notmuch-address-selection-function (format "Address (%s matches): " num-options) - ;; We put the first match as the initial - ;; input; we put all the matches as - ;; possible completions, moving the - ;; first match to the end of the list - ;; makes cursor up/down in the list work - ;; better. - (append (cdr options) (list (car options))) - (car options)))))) + options + orig))))) (if chosen (progn (push chosen notmuch-address-history) -- 2.29.1