Subject: Re: bug#34292: 26.1; ido-everywhere interferes with find-file

From: Noam Postavsky <[email-masked]>
Date: Wed, 03 Apr 2019 20:49:48 -0400

Dave Abrahams <[email-masked]> writes:

> shouldn't starting ido-everywhere turn on ido-mode automatically, then?

Seems doable, does this work for you?

>From a21e8afe70b0f8fef692d235dc85995c01ca4e7a Mon Sep 17 00:00:00 2001
From: Noam Postavsky <[email-masked]>
Date: Wed, 3 Apr 2019 20:13:05 -0400
Subject: [PATCH] Let ido-everywhere turn on ido-mode (Bug#34292)

* lisp/ido.el (ido-everywhere): Turn on ido-mode, if it's not already
on.  Otherwise, having ido-everywhere enabled messes all file and
buffer reading interactive commands.
---
 lisp/ido.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/ido.el b/lisp/ido.el
index 0854014581..a89f7b0eaa 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1586,8 +1586,10 @@ (define-minor-mode ido-everywhere
   (remove-function read-file-name-function #'ido-read-file-name)
   (remove-function read-buffer-function #'ido-read-buffer)
   (when ido-everywhere
-    (add-function :override read-file-name-function #'ido-read-file-name)
-    (add-function :override read-buffer-function #'ido-read-buffer)))
+    (if (not ido-mode)
+        (ido-mode 'both)
+      (add-function :override read-file-name-function #'ido-read-file-name)
+      (add-function :override read-buffer-function #'ido-read-buffer))))
 
 (defvar ido-minor-mode-map-entry nil)
 
-- 
2.11.0

(it seems to be working for me now, though I had a transient failure the
first time where it refused to open bar, even though ido seemed to be
functioning correctly.  Maybe a caching thing?)