]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: notmuch-mua-prompt-for-sender: don't force Ido on users
authorJonas Bernoulli <jonas@bernoul.li>
Sun, 10 Jan 2021 14:00:56 +0000 (15:00 +0100)
committerDavid Bremner <david@tethera.net>
Wed, 13 Jan 2021 11:23:11 +0000 (07:23 -0400)
We shouldn't force `ido-completion-read' on users who do not otherwise
use Ido.  Unfortunately simply turning on `ido-mode' does not change
every `completing-read' into a `ido-completing-read', instead it only
changes file and buffer completion.

I do realize that existing Ido users will initially dislike this
change, but I would like to encourage them to see this as an
opportunity to learn about Fido.

Unlike `ido-mode', build-in `fido-mode' confirms to the standard
completion API, so turning it on causes every `completing-read' to
use the Fido completion mechanism and which is similar to the Ido
mechanism:

> An enhanced `icomplete-mode' that emulates `ido-mode'.  This global
> minor mode makes minibuffer completion behave more like `ido-mode'
> than regular `icomplete-mode'."

emacs/notmuch-mua.el

index 95d1965b9696ab45781ebe9ecd757727ac191741..2d0b7169f9acc90dfbdfce4c596c5e89e0075bed 100644 (file)
@@ -431,16 +431,16 @@ the From: header is already filled in by notmuch."
 (defun notmuch-mua-prompt-for-sender ()
   "Prompt for a sender from the user's configured identities."
   (if notmuch-identities
-      (ido-completing-read "Send mail from: " notmuch-identities
-                          nil nil nil 'notmuch-mua-sender-history
-                          (car notmuch-identities))
+      (completing-read "Send mail from: " notmuch-identities
+                      nil nil nil 'notmuch-mua-sender-history
+                      (car notmuch-identities))
     (let* ((name (notmuch-user-name))
           (addrs (cons (notmuch-user-primary-email)
                        (notmuch-user-other-email)))
           (address
-           (ido-completing-read (concat "Sender address for " name ": ") addrs
-                                nil nil nil 'notmuch-mua-sender-history
-                                (car addrs))))
+           (completing-read (concat "Sender address for " name ": ") addrs
+                            nil nil nil 'notmuch-mua-sender-history
+                            (car addrs))))
       (message-make-from name address))))
 
 (put 'notmuch-mua-new-mail 'notmuch-prefix-doc "... and prompt for sender")