unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [RFC] emacs: use ido completing read for address completion in message mode
@ 2012-07-12 17:54 Mark Walters
  0 siblings, 0 replies; only message in thread
From: Mark Walters @ 2012-07-12 17:54 UTC (permalink / raw)
  To: notmuch

This patch uses ido-completing-read for address completion in message
mode.  Although ido-completing-read is nominally a drop-in replacement
for completing-read `initial` and `default` behave rather differently
and it makes sense to use `default` rather than `initial` in the ido
case.
---

There was some interest on irc for using ido-completing-read for
address completion in message-mode so here is a trivial patch.

I am not sure I like the ido-completing-read behaviour as typing in
the minibuffer matches anywhere in the address not just at the start
of the address. I think there is a difference between this and setting
the users from address where it is likely that many of their addresses
start the same.

But it might be a starting point for experiments.

Best wishes

Mark


 emacs/notmuch-address.el |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index 2bf762b..08e0e38 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -61,9 +61,9 @@ line."
 		  ((eq num-options 1)
 		   (car options))
 		  (t
-		   (completing-read (format "Address (%s matches): " num-options)
-				    (cdr options) nil nil (car options)
-				    'notmuch-address-history)))))
+		   (ido-completing-read (format "Address (%s matches): " num-options)
+				    (cdr options) nil nil nil
+				    'notmuch-address-history (car options))))))
     (if chosen
 	(progn
 	  (push chosen notmuch-address-history)
-- 
1.7.9.1

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

only message in thread, other threads:[~2012-07-12 17:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-12 17:54 [RFC] emacs: use ido completing read for address completion in message mode Mark Walters

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).