emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Directory name completion blocks when it shouldn't


From: Kim F. Storm
Subject: Re: Directory name completion blocks when it shouldn't
Date: Mon, 04 Dec 2006 14:41:24 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Tim Van Holder <address@hidden> writes:

> My original report received no replies and it's been over 3 months,
> hence this ping.
>
> Originally reported for GNU Emacs 22.0.50.1 of 2006-08-01.
> Still present in GNU Emacs 22.0.91.1 of 2006-12-04.
>
> Given a directory structure of the form:
>
> /top-dir/sub-dir/a-file
> /top-dir/some-file
>
> With M-x cd, entering "/t" TAB completes to "/top-dir/" like it should,
> but "/top-dir/s" TAB does NOT complete to "/top-dir/sub-dir/" even though
> there is only 1 matching directory (TAB TAB shows only "sub-dir" as only
> alternative); it's necessary to disambiguate the directory name from the
> names of any and all files in the same location for tab completion to
> proceed.  This seems like a bug.


There was a discussion of this back in October 2004, see 

http://lists.gnu.org/archive/html/emacs-devel/2004-10/msg00507.html


However, here RMS claims that:

> The reason that dired does not use read-directory-name is that the
> input need not be a directory name.  The input is often a wildcard
> file name pattern.

But if I change dired to use read-directory-name, it works just
fine to enter a wildcard, so I don't see why we have to use
the illogical read-file-name here [of course, the code below
can be simplified further if people agree we can use r-d-n].


*** dired.el    04 Dec 2006 09:41:08 +0100      1.354
--- dired.el    04 Dec 2006 14:39:16 +0100      
***************
*** 584,590 ****
            (if (next-read-file-uses-dialog-p)
                (read-directory-name (format "Dired %s(directory): " str)
                                     nil default-directory nil)
!             (read-file-name (format "Dired %s(directory): " str)
                              nil default-directory nil)))))
  
  ;;;###autoload (define-key ctl-x-map "d" 'dired)
--- 584,590 ----
            (if (next-read-file-uses-dialog-p)
                (read-directory-name (format "Dired %s(directory): " str)
                                     nil default-directory nil)
!             (read-directory-name-name (format "Dired %s(directory): " str)
                              nil default-directory nil)))))
  
  ;;;###autoload (define-key ctl-x-map "d" 'dired)


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





reply via email to

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