[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Noam Postavsky
Subject: bug#34292: 26.1; ido-everywhere interferes with find-file
Date: Wed, 03 Apr 2019 20:49:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.91 (gnu/linux)

Dave Abrahams <address@hidden> 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 <address@hidden>
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)

(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?)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]