From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
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) [thread overview]
Message-ID: <200601030122.k031Mvf24296@raven.dms.auburn.edu> (raw)
In-Reply-To: <MEEKKIABFKKDFJMPIOEBAEEBCOAA.drew.adams@oracle.com>
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.
next prev parent reply other threads:[~2006-01-03 1:22 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-02 22:57 Null filename ("") is considered to correspond to an existing, readable, and writable file? Drew Adams
2006-01-03 1:22 ` Luc Teirlinck [this message]
2006-01-03 3:27 ` Drew Adams
2006-01-03 4:41 ` Luc Teirlinck
2006-01-03 8:24 ` Drew Adams
2006-01-03 18:13 ` Eli Zaretskii
2006-01-03 4:56 ` Luc Teirlinck
2006-01-03 5:32 ` Eli Zaretskii
2006-01-03 8:25 ` Drew Adams
2006-01-03 15:50 ` Stefan Monnier
2006-01-03 18:51 ` Drew Adams
2006-01-03 19:16 ` Eli Zaretskii
2006-01-03 19:25 ` Drew Adams
2006-01-03 19:40 ` Luc Teirlinck
2006-01-03 20:23 ` Luc Teirlinck
2006-01-03 21:09 ` Drew Adams
2006-01-07 20:04 ` Thien-Thi Nguyen
2006-01-03 18:11 ` Eli Zaretskii
2006-01-03 18:51 ` Drew Adams
2006-01-03 19:13 ` Eli Zaretskii
2006-01-03 19:23 ` Drew Adams
2006-01-03 18:51 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200601030122.k031Mvf24296@raven.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.