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 cN1UK3wJ+1/2eQAA0tVLHw (envelope-from ) for ; Sun, 10 Jan 2021 14:04:44 +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 gG0dJ3wJ+19iXgAA1q6Kng (envelope-from ) for ; Sun, 10 Jan 2021 14:04:44 +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 340BB940463 for ; Sun, 10 Jan 2021 14:04:44 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id B24E02BF86; Sun, 10 Jan 2021 09:02:21 -0500 (EST) Received: from mail.hostpark.net (mail.hostpark.net [212.243.197.30]) by mail.notmuchmail.org (Postfix) with ESMTPS id 877CB29D06 for ; Sun, 10 Jan 2021 09:01:19 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.hostpark.net (Postfix) with ESMTP id D97F5166B6 for ; Sun, 10 Jan 2021 15:01:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bernoul.li; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=sel2011a; t=1610287274; bh=euwS3V8+dsS/oIR XbviN8xZSoHWoW8bIRlxnr3CMccY=; b=KtSOJOtYHkZ3E/pkCx9dk7pmSRowRnN PC0mk25wTmzKS9e4APO2DP5skmopxhNr94DCv//e7OFgXkMzLrDUiAArxwhwrATT Ak6n6Ql/CbbQl8Kz49rkT105AiMrB2/IcdzyhUMVMbcdETNMEHFAe3Q3tjmR6LVb X+6YYCNAhuC4= X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail.hostpark.net ([127.0.0.1]) by localhost (mail0.hostpark.net [127.0.0.1]) (amavisd-new, port 10224) with ESMTP id z42NtYaWsOPS for ; Sun, 10 Jan 2021 15:01:14 +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 ACA4E166B8 for ; Sun, 10 Jan 2021 15:01:14 +0100 (CET) From: Jonas Bernoulli To: notmuch@notmuchmail.org Subject: [PATCH v2 36/36] emacs: notmuch-address-expand-name: use the actual initial-input Date: Sun, 10 Jan 2021 15:01:12 +0100 Message-Id: <20210110140112.25930-37-jonas@bernoul.li> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20210110140112.25930-1-jonas@bernoul.li> References: <20201214162401.19569-1-jonas@bernoul.li> <20210110140112.25930-1-jonas@bernoul.li> MIME-Version: 1.0 Message-ID-Hash: OMIOGLCTGYW4XE6EPD7YY63K45HDPRET X-Message-ID-Hash: OMIOGLCTGYW4XE6EPD7YY63K45HDPRET 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-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.09 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=bernoul.li header.s=sel2011a header.b=KtSOJOtY; 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-Migadu-Queue-Id: 340BB940463 X-Spam-Score: -0.09 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2XlJ/R5SJgYn 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 6e136473..f0af6667 100644 --- a/emacs/notmuch-address.el +++ b/emacs/notmuch-address.el @@ -244,14 +244,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