unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / Atom feed
* [PATCH 3/3] emacs: notmuch-address-expand-name: use the actual initial-input
  2020-11-08 23:11 [PATCH 0/3] emacs: allow opting out of notmuch's address completion Jonas Bernoulli
@ 2020-11-08 23:11 ` Jonas Bernoulli
  0 siblings, 0 replies; only message in thread
From: Jonas Bernoulli @ 2020-11-08 23:11 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-08 23:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-08 23:11 [PATCH 0/3] emacs: allow opting out of notmuch's address completion Jonas Bernoulli
2020-11-08 23:11 ` [PATCH 3/3] emacs: notmuch-address-expand-name: use the actual initial-input Jonas Bernoulli

unofficial mirror of notmuch@notmuchmail.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/notmuch/0 notmuch/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 notmuch notmuch/ https://yhetil.org/notmuch \
		notmuch@notmuchmail.org
	public-inbox-index notmuch

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.notmuch.general
	nntp://news.gmane.io/gmane.mail.notmuch.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git