[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: |
28 Feb 2002 13:41:17 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 |
eliz@is.elta.co.il (Eli Zaretskii) writes:
> On 28 Feb 2002, David Kastrup wrote:
>
> > > Do you mean, return ""?
> >
> > Yes.
> >
> > > That would violate the principle that expand-file-name always
> > > returns an absolute file name.
> >
> > Absolute file names come in a variety of flavours. They do not need
> > to start with "/". For example, there are systems where they start
> > with the equivalent of "C:" before the first root /, or even
> > "/ftp@ftp.gnu.org:". So what is it that qualifies an absolute file
> > name?
[you snipped: my contention that it shoud behave the same regardless
of the current work directory]
> See file-name-absolute-p. It says that in Emacs, a file name is absolute
> if it satisfies one of these conditions:
>
> - begins with a directory separator (normally `/')
>
> - begins with a `~'
>
> - on DOS/Windows systems begins with a drive letter
Well, I doubt we have many programs that do the equivalent of
(while (not (file-name-absolute-p file))
(setq file (expand-file-name file)))
Even if one did, file-name-absolute-p is highly system dependent.
One could make it return t for "" as well if one was so inclined. I
rather doubt that applications rely on certain semantics of
file-name-absolute-p for illegal file names.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: David.Kastrup@t-online.de
- file-readable-p returns t for empty string, Järneström Jonas, 2002/02/26
- Re: file-readable-p returns t for empty string, Eli Zaretskii, 2002/02/26
- Re: file-readable-p returns t for empty string, Richard Stallman, 2002/02/27
- 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 <=
- 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, 2002/02/28
- 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