[Top][All Lists]

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

Re: locate-file in Emacs

From: Hrvoje Niksic
Subject: Re: locate-file in Emacs
Date: Thu, 18 Apr 2002 18:24:04 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Common Lisp, i686-pc-linux)

Eli Zaretskii <address@hidden> writes:

> On Thu, 18 Apr 2002, Stefan Monnier wrote:
>> But I have one question left: should the `file-directory-p' check be enforced
>> independently from `predicate' ?
>> I.e. can (locate-file f p s 'file-readable-p) return a directory ?
> My vote is for NO, for a couple of reasons:
>   - it is rare for a program to want to find files and directories alike, 
>     so using file-directory-p is not a nuisance, in practice;
>   - different filesystems impose different limitations on what system 
>     calls work on directories (for example, some won't let you `read' a 
>     directory), so the application will have to filter non-files anyway.
> Of course, compatibility considerations could render these reasons less 
> important.

Fortunately, compatibility agrees with your reasoning, and so do I.

Note that XEmacs's internal locate_file() is based on what was once
openp().  So the similarities are not completely coincidental.

reply via email to

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