From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Hrvoje Niksic Newsgroups: gmane.emacs.devel Subject: Re: locate-file in Emacs Date: Thu, 18 Apr 2002 18:24:04 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1019147224 8082 127.0.0.1 (18 Apr 2002 16:27:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 18 Apr 2002 16:27:04 +0000 (UTC) Cc: Stefan Monnier , 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 16yEkR-00026F-00 for ; Thu, 18 Apr 2002 18:27:03 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16yF3h-0005Ir-00 for ; Thu, 18 Apr 2002 18:46:57 +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 16yEkV-0004jX-00; Thu, 18 Apr 2002 12:27:07 -0400 Original-Received: from dragon.arsdigita.de ([212.84.246.66] helo=florida.arsdigita.de) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yEhd-0004Zz-00 for ; Thu, 18 Apr 2002 12:24:09 -0400 Original-Received: from hniksic by florida.arsdigita.de with local (Exim 3.35 #1 (Debian)) id 16yEhY-00071E-00; Thu, 18 Apr 2002 18:24:04 +0200 Original-To: Eli Zaretskii X-Attribution: Hrvoje X-Face: &{dT~)Pu6V<0y?>3p$;@vh\`C7xB~A0T-J%Og)J,@-1%q6Q+, gs<-9M#&`I8cJp2b1{vPE|~+JE+gx;a7%BG{}nY^ehK1"q#rG O,Rn1A_Cy%t]V=Brv7h (Eli Zaretskii's message of "Thu, 18 Apr 2002 19:39:35 +0300 (IDT)") Original-Lines: 24 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Common Lisp, i686-pc-linux) 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:2738 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2738 Eli Zaretskii 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.