Skip to main content
Bounty Ended with 25 reputation awarded by CommunityBot
added 434 characters in body
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257
(defadvice dired-create-directory (around inhibit-ido activate)
  "Turn off Ido mode for the duration, then turn it on."
  (unwind-protect
       (progn (ido-everywhere -1) ad-do-it)
    (ido-everywhere 1)))

If you aren't sure you always want ido-everywhere mode turned on at the end, then you can do this instead - it keeps it on or off, as it was before using dired-create-directory:

(defadvice dired-create-directory (around inhibit-ido activate)
  "Inhibit Ido for the duration."
  (let ((orig-ido-everywhere  ido-everywhere))
    (unwind-protect
        (progn (ido-everywhere -1) ad-do-it)
      (when orig-ido-everywhere (ido-everywhere 1)))))
(defadvice dired-create-directory (around inhibit-ido activate)
  "Turn off Ido mode for the duration, then turn it on."
  (unwind-protect
       (progn (ido-everywhere -1) ad-do-it)
    (ido-everywhere 1)))
(defadvice dired-create-directory (around inhibit-ido activate)
  "Turn off Ido mode for the duration, then turn it on."
  (unwind-protect
       (progn (ido-everywhere -1) ad-do-it)
    (ido-everywhere 1)))

If you aren't sure you always want ido-everywhere mode turned on at the end, then you can do this instead - it keeps it on or off, as it was before using dired-create-directory:

(defadvice dired-create-directory (around inhibit-ido activate)
  "Inhibit Ido for the duration."
  (let ((orig-ido-everywhere  ido-everywhere))
    (unwind-protect
        (progn (ido-everywhere -1) ad-do-it)
      (when orig-ido-everywhere (ido-everywhere 1)))))
typo: ad-doit => ad-do-it
Source Link
Dan
  • 33.4k
  • 7
  • 106
  • 171
(defadvice dired-create-directory (around inhibit-ido activate)
  "Turn off Ido mode for the duration, then turn it on."
  (unwind-protect
       (progn (ido-everywhere -1) ad-doitdo-it)
    (ido-everywhere 1)))
(defadvice dired-create-directory (around inhibit-ido activate)
  "Turn off Ido mode for the duration, then turn it on."
  (unwind-protect
       (progn (ido-everywhere -1) ad-doit)
    (ido-everywhere 1)))
(defadvice dired-create-directory (around inhibit-ido activate)
  "Turn off Ido mode for the duration, then turn it on."
  (unwind-protect
       (progn (ido-everywhere -1) ad-do-it)
    (ido-everywhere 1)))
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257

(defadvice dired-create-directory (around inhibit-ido activate)
  "Turn off Ido mode for the duration, then turn it on."
  (unwind-protect
       (progn (ido-everywhere -1) ad-doit)
    (ido-everywhere 1)))