[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ido shows wrong completions
From: |
Matthieu MOY |
Subject: |
Re: ido shows wrong completions |
Date: |
Tue, 16 Aug 2005 15:49:48 +0200 (CEST) |
User-agent: |
SquirrelMail/1.4.4 |
Kim F. Storm said:
>> My advice would be to take the trailing slash into account. For example,
>> make "/" equivalent to what is currently "/ RET".
>
> Ido does that already if there are no other completions, see
> ido-enter-single-matching-directory.
How about this?
--- ido.el.orig 2005-08-16 15:44:53.000000000 +0200
+++ ido.el 2005-08-16 15:45:48.000000000 +0200
@@ -696,6 +696,14 @@
(other :tag "Always" t))
:group 'ido)
+(defcustom ido-enter-matching-directory-anyway t
+ "*Automatically enter sub-directory even if it is not the only match.
+
+If non-nil, typing \"/\" enters the directory corresponding to the
+first match, even if it is not the only match."
+ :type 'boolean
+ :group 'ido)
+
(defcustom ido-create-new-buffer 'prompt
"*Specify whether a new buffer is created if no buffer matches substring.
Choices are 'always to create new buffers unconditionally, 'prompt to
@@ -3976,7 +3984,8 @@
(when (and ido-enter-single-matching-directory
ido-matches
- (null (cdr ido-matches))
+ (or ido-enter-matching-directory-anyway
+ (null (cdr ido-matches)))
(ido-final-slash (car ido-matches))
(or try-single-dir-match
(eq ido-enter-single-matching-directory t)))
(I leave the default value up to you ;-). The problem with this patch is
that it inhibit one feature of ido: typing '/' to be able to cycle through
directories. Well, *I* prefer the behavior of my patch, but I don't know
about other users).
--
Matthieu