From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Dan Katz" Newsgroups: gmane.emacs.bugs Subject: Documentation of file-exists-p in the elisp manual could be better... Date: Thu, 05 Jun 2003 14:05:03 -0400 Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87brxcz9gw.fsf@profitlogic.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1054840981 6998 80.91.224.249 (5 Jun 2003 19:23:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 5 Jun 2003 19:23:01 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 05 21:22:59 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19O0JA-0001jH-00 for ; Thu, 05 Jun 2003 21:21:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19O0IR-0004WY-OY for gnu-bug-gnu-emacs@m.gmane.org; Thu, 05 Jun 2003 15:21:11 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19O0Ej-0003VS-OS for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2003 15:17:21 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19O00D-0008GJ-Si for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2003 15:02:22 -0400 Original-Received: from [12.46.106.161] (helo=mail.grossprofit.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Nz6s-00027L-KV for bug-gnu-emacs@gnu.org; Thu, 05 Jun 2003 14:05:10 -0400 Original-Received: from mail.profitlogic.com (10-0-101-28.dhcp.grossprofit.com Internet Mail Service Version 5.5.2653.13) id M2QYTSWC; Thu, 5 Jun 2003 14:05:04 -0400 Original-Received: by mail.profitlogic.com (sSMTP sendmail emulation); Thu, 5 Jun 2003 14:05:03 -0400 Original-To: bug-gnu-emacs@gnu.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5249 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5249 In GNU Emacs 21.3.2 (i386-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2003-04-24 on raven, modified by Debian Hi. I went looking for a way to find out if a directory existed, and ended up using file-exists-p. Looking at the elisp manual, however, did not make it clear whether this was the correct approach or whether it was "working by accident." In particular, the elisp manual description of file-exists-p was not really clear whether (or how) this function would (or should) work for directories, sym-links, etc. While it seems to basically "do the right thing", I suggest that the documentation needs to be a bit more explicit about notions of "generalized" files and how the file-handling functions apply. The docstring for file-exists-p was not much use in this regard, although it's link to file-attributes is what led me to suspect that file-exists-p might be the correct approach for directories as well. That's a rather indirect hint, however. I hope this documentation commentary is useful. Dan