[Top][All Lists]

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

Re: Reading directory names with read-file-name

From: Kim F. Storm
Subject: Re: Reading directory names with read-file-name
Date: 29 May 2002 01:11:36 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Stefan Monnier" <monnier+gnu/address@hidden> writes:

> >     However, one of the candidates for an improvement could be
> >     file-name-all-completions adding a third PREDICATE arg.
> >     However, I think that's still not feasible for the reasons
> >     I mentioned in my previous mail.
> > 
> > There is no need to get that discouraged!  You have pointed out a
> > complication, but a complication does not mean it is unfeasible.  It
> > just means a little more work is needed.
> > 
> > You can fix the file name handlers--in fact, they may not even need
> > any change.  Please take a look and see if they need any change.
> FWIW I don't think that file-name-all-completions and file-name-completion
> need to be changed at all in order to implement the PREDICATE argument
> for read-file-name.

No, but it makes a significant difference in performance to check for
specific predicates like file-regular-p, file-writable-p etc
in file-name-all-completions where the file is already stat'ed.

As you point out it is not _necessary_, so we can do it later
if the current functionality is inadequate for a specific purpose.

BTW, for reading directory names, I've added specific code to
handle file-directory-p efficiently.

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

reply via email to

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