From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Null filename ("") is considered to correspond to an existing, readable, and writable file? Date: Mon, 2 Jan 2006 19:22:57 -0600 (CST) Message-ID: <200601030122.k031Mvf24296@raven.dms.auburn.edu> References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1136251654 10764 80.91.229.2 (3 Jan 2006 01:27:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 3 Jan 2006 01:27:34 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 03 02:27:33 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EtaxX-0006gT-RQ for ged-emacs-devel@m.gmane.org; Tue, 03 Jan 2006 02:27:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Etaz5-0001Nx-41 for ged-emacs-devel@m.gmane.org; Mon, 02 Jan 2006 20:29:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Etaxw-0001Nq-G7 for emacs-devel@gnu.org; Mon, 02 Jan 2006 20:27:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Etaxe-0001LK-Jn for emacs-devel@gnu.org; Mon, 02 Jan 2006 20:27:55 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Etaxe-0001LH-HA for emacs-devel@gnu.org; Mon, 02 Jan 2006 20:27:38 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Etayj-0007nV-3u for emacs-devel@gnu.org; Mon, 02 Jan 2006 20:28:48 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.13.3+Sun/8.13.3) with ESMTP id k031PJC0010802; Mon, 2 Jan 2006 19:25:20 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id k031Mvf24296; Mon, 2 Jan 2006 19:22:57 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: drew.adams@oracle.com In-reply-to: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.1 (manatee.dms.auburn.edu [131.204.53.104]); Mon, 02 Jan 2006 19:25:20 -0600 (CST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48637 Archived-At: Drew Adams wrote: The following expressions all return true (on Windows, at least). I imagine that this is by design (it is an old policy), but I don't understand the reason for this. (file-exists-p "") (file-readable-p "") (file-writable-p "") How often would someone want a null filename to be considered to correspond to an existing, readable, or writable file? The empty string is a relative file name. It is the current directory, given be the buffer-local variable default-directory. Just do `M-: (find-file ""). There can not be any file with a "null" file name other than the current directory. Also, the doc strings and the manual say nothing about using a default directory (yes, apparently) or whether the FILENAME argument must include a directory (it need not, apparently). It would get rather tedious if every single docstring of any function handling files had to explain the difference between relative and absolute file names and if all these docstrings had to document the variable default-directory. The Elisp manual talks about relative and absolute file names and documents default-directory. Sincerely, Luc.