[RFC] emacs: use ido completing read for address completion in message mode

Mark Walters markwalters1009 at gmail.com
Thu Jul 12 10:54:07 PDT 2012


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



More information about the notmuch mailing list