[PATCH] emacs: initialize ido mode in notmuch-mua.el

Mark Walters markwalters1009 at gmail.com
Wed Feb 22 00:48:49 PST 2012


ido-completing-read is used in notmuch-mua.el without any
initialization.  This should work but a bug (emacs bug #3247) in some
emacs 23 versions (including 23.2.1 from Debian stable) causes emacs
to get stuck in the mini-buffer. This tests to see if ido-mode has
been initialized and if not calls it. This avoids the bug for these
older versions of emacs.

This is the only place that ido-completing-read is used so an alternative 
would be to replace ido-completing-read by completing-read but cworth 
expressed a preference for the ido version in 
id:"87wrhfvk6a.fsf at yoom.home.cworth.org"


---
 emacs/notmuch-mua.el |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 4be7c13..9fe75db 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -194,6 +194,8 @@ the From: header is already filled in by notmuch."
 	    addresses     (cons (notmuch-user-primary-email) (notmuch-user-other-email))
 	    one-name-only t))
     ;; Now prompt the user, either for an email address only or for a full identity.
+    (unless ido-mode
+      (ido-mode t))
     (if one-name-only
 	(let ((address
 	       (ido-completing-read (concat "Sender address for " name ": ") addresses
-- 
1.7.2.3



More information about the notmuch mailing list