emacs-devel
[Top][All Lists]
Advanced

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

Re: ido-read-file-name default-filename


From: Kim F. Storm
Subject: Re: ido-read-file-name default-filename
Date: Thu, 18 May 2006 09:44:20 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Karl Chen <address@hidden> writes:

>>>>>> On 2006-05-17 14:25 PDT, Kim F Storm writes:
>
>     Kim> I have installed a change which I think will fix this in
>     Kim> general.  Please try the latest version.
>
> Hi Kim, it works, but only when ido-show-dot-for-dired is nil.

Rats.

> The use case 
>     (ido-everywhere 1)
>     M-x diff RET
>     RET for current buffer-file-name
>
> Perhaps the solution is if default-filename is not nil, then
> initially put it before "." even if ido-show-dot-for-dired.  Or
> maybe diff-mode should let-bind ido-show-dot-for-dired nil.  

Or ido-read-file-name should simply bind ido-show-dot-for-dired to nil
when default-filename is specified and it is not explicitly reading a
directory name.

Can you try this patch:

*** ido.el      17 May 2006 23:23:34 +0200      1.94
--- ido.el      18 May 2006 09:43:24 +0200      
***************
*** 4475,4480 ****
--- 4475,4482 ----
             (ido-directory-too-big (and (not ido-directory-nonreadable)
                                         (ido-directory-too-big-p 
ido-current-directory)))
             (ido-work-directory-index -1)
+            (ido-show-dot-for-dired (and ido-show-dot-for-dired
+                                         (not default-filename)))
             (ido-work-file-index -1)
             (ido-find-literal nil))
        (setq ido-exit nil)

> I guess one problem is read-file-name is overloaded for 2
> different use cases: 1. read a file name (not a directory), and
> 2. read a file name or a directory name.  Separating
> read-file-name into two functions or adding a flag indicating
> intent would help.

That's too late I guess...

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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