From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: locate-file in Emacs Date: Thu, 18 Apr 2002 23:25:27 -0600 (MDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200204190525.g3J5PRY00797@aztec.santafe.edu> References: <200204170928.g3H9SVb27019@rum.cs.yale.edu> <200204171001.g3HA1hh27230@rum.cs.yale.edu> <200204181408.g3IE83b02114@rum.cs.yale.edu> <200204181527.g3IFRFC02843@rum.cs.yale.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1019194077 16645 127.0.0.1 (19 Apr 2002 05:27:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 19 Apr 2002 05:27:57 +0000 (UTC) Cc: hniksic@arsdigita.com, monnier+gnu/emacs@RUM.cs.yale.edu, 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 16yQw9-0004KM-00 for ; Fri, 19 Apr 2002 07:27:57 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16yRFf-0005zu-00 for ; Fri, 19 Apr 2002 07:48:07 +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 16yQwE-0006YI-00; Fri, 19 Apr 2002 01:28:02 -0400 Original-Received: from pele.santafe.edu ([192.12.12.119]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16yQtk-0006K6-00; Fri, 19 Apr 2002 01:25:28 -0400 Original-Received: from aztec.santafe.edu (aztec [192.12.12.49]) by pele.santafe.edu (8.11.6+Sun/8.9.3) with ESMTP id g3J5PRa29345; Thu, 18 Apr 2002 23:25:27 -0600 (MDT) Original-Received: (from rms@localhost) by aztec.santafe.edu (8.10.2+Sun/8.9.3) id g3J5PRY00797; Thu, 18 Apr 2002 23:25:27 -0600 (MDT) X-Authentication-Warning: aztec.santafe.edu: rms set sender to rms@aztec using -f Original-To: monnier+gnu/emacs@RUM.cs.yale.edu In-Reply-To: <200204181527.g3IFRFC02843@rum.cs.yale.edu> (monnier+gnu/emacs@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:2761 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2761 Based on the information here, I think I'll go ahead and implement the functionality on top of `openp' with just a `predicate' argument and without backward compatibility for `mode'. We should support backward compatibility values of MODE such as `executable' and `writable'. That is a clean enough interface, so there is no particular downside to supporting it. We could allow predicates as alternative values for the same argument, or we could add another optional argument PREDICATE. But I have one question left: should the `file-directory-p' check be enforced independently from `predicate' ? Definitely yes--by default. The default should be to return only files, not directories. There could be an additional optional argument which says "accept directories too." Perhaps it could also have a way to specify that you want directories only.