[Top][All Lists]

[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

address@hidden (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
a) (expand-file-name "") returned ""
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

David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]