[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file-readable-p returns t for empty string
From: |
David Kastrup |
Subject: |
Re: file-readable-p returns t for empty string |
Date: |
01 Mar 2002 03:58:29 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 |
rms@gnu.org (Richard Stallman) writes:
> "Absolute file name" is a widely-used notion, and as such, is mostly
> known to programmers, even if its exact definition is sometimes a bit
> vague. An empty string is a strange file name to include in that
> category, so programmers will probably not expect that.
>
> Yes, exactly. The idea of defining "" as an absolute file name is
> absurd, so there is no need to investigate whether it would "work".
> We won't do this.
Well, expanding "" (which would yield an error if you tried it opening
under any operating system) to ".", an entirely different file, is
equally absurd. While there is a perverse logic to calling ""
absolute (as it is supposed to fail regardless of the current working
directory setting), I agree that the logic is, well, perverse.
I think it would be more to the expectations of the usual programmer
if
a) (expand-file-name "") returned ""
and
b) (file-name-absolute-p "") returned NIL
After all, the file name is illegal. Both declaring it as equivalent
to the legal file name "." as well as declaring it absolute seem
absurd.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David.Kastrup@t-online.de
- Re: file-readable-p returns t for empty string, (continued)
- Re: file-readable-p returns t for empty string, Richard Stallman, 2002/02/27
- Re: file-readable-p returns t for empty string, David Kastrup, 2002/02/28
- Re: file-readable-p returns t for empty string, Eli Zaretskii, 2002/02/28
- Re: file-readable-p returns t for empty string, David Kastrup, 2002/02/28
- Re: file-readable-p returns t for empty string, Eli Zaretskii, 2002/02/28
- Re: file-readable-p returns t for empty string, David Kastrup, 2002/02/28
- Re: file-readable-p returns t for empty string, Eli Zaretskii, 2002/02/28
- Re: file-readable-p returns t for empty string, Richard Stallman, 2002/02/28
- Re: file-readable-p returns t for empty string,
David Kastrup <=
- Re: file-readable-p returns t for empty string, Eli Zaretskii, 2002/02/27
- Re: file-readable-p returns t for empty string, David Kastrup, 2002/02/27
- Re: file-readable-p returns t for empty string, Stefan Monnier, 2002/02/28
- Re: file-readable-p returns t for empty string, Kevin Rodgers, 2002/02/27
- Re: file-readable-p returns t for empty string, Andreas Schwab, 2002/02/27
Re: file-readable-p returns t for empty string, Andreas Schwab, 2002/02/26