From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: locate-file in Emacs Date: Thu, 18 Apr 2002 19:39:35 +0300 (IDT) Sender: emacs-devel-admin@gnu.org Message-ID: References: <200204181527.g3IFRFC02843@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1019144531 1493 127.0.0.1 (18 Apr 2002 15:42:11 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 18 Apr 2002 15:42:11 +0000 (UTC) Cc: Hrvoje Niksic , emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16yE31-0000Ny-00 for ; Thu, 18 Apr 2002 17:42:11 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16yEMF-0004Hn-00 for ; Thu, 18 Apr 2002 18:02:03 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yE33-0000RY-00; Thu, 18 Apr 2002 11:42:13 -0400 Original-Received: from is.elta.co.il ([199.203.121.2]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yE1u-0000OW-00 for ; Thu, 18 Apr 2002 11:41:03 -0400 Original-Received: from is (is [199.203.121.2]) by is.elta.co.il (8.9.3/8.8.8) with SMTP id TAA09270; Thu, 18 Apr 2002 19:39:35 +0300 (IDT) X-Sender: eliz@is Original-To: Stefan Monnier In-Reply-To: <200204181527.g3IFRFC02843@rum.cs.yale.edu> Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2736 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2736 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.