[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Allow prefix arg for ido-find-*file* (maybe)
From: |
Sean O'Rourke |
Subject: |
Allow prefix arg for ido-find-*file* (maybe) |
Date: |
Tue, 14 Sep 2004 10:07:53 -0700 |
User-agent: |
Wanderlust/2.11.31 (Wonderwall) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3.50 (powerpc-apple-darwin7.5.0) MULE/5.0 (SAKAKI) |
ido mode is currently unusably slow when finding a file in a large
directory. For example, in a directory with ~3000 files,
`ido-find-file' takes several seconds to come up with a prompt. When
you know you're in such a directory, it would be nice to bypass ido
entirely and fall back to the original `find-file'. Since the ido
functions currently don't use a prefix argument, I think that when
called with a prefix argument, the ido functions should fall back to
their non-ido equivalents.
/s
ps -- here's a defadvice to get the effect I want:
(defadvice ido-find-file (around allow-prefix compile activate)
(if current-prefix-arg
(let ((read-file-name-function nil))
(call-interactively 'find-file))
ad-do-it))
(defadvice ido-find-file-other-window (around allow-prefix compile activate)
(if current-prefix-arg
(let ((read-file-name-function nil))
(call-interactively 'find-file-other-window))
ad-do-it))
(defadvice ido-find-alternate-file (around allow-prefix compile activate)
(if current-prefix-arg
(let ((read-file-name-function nil))
(call-interactively 'find-alternate-file))
ad-do-it))
- Allow prefix arg for ido-find-*file* (maybe),
Sean O'Rourke <=