bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file-readable-p returns t for empty string


From: Eli Zaretskii
Subject: Re: file-readable-p returns t for empty string
Date: Fri, 01 Mar 2002 14:28:52 +0200

> From: David Kastrup <address@hidden>
> Newsgroups: gnu.emacs.bug
> Date: 01 Mar 2002 12:38:59 +0100
> 
> The problem is not so much that expand-file-name as a user-called
> routine returns "." for "", the problem is that expand-file-name is
> called implicitly in a lot of cases in Emacs.  While one could argue
> for and against this particular behaviour for expand-file-name
> itself, the point is that it also reflects on routines like
> (file-readable-p), (file-directory-p) and the like.

If the problem is with some callers of expand-file-name, we could fix
those callers instead of making a change in expand-file-name.  For
example, if it's deemed to be inappropriate for file-readable-p to do
that (and I agree that it could be quite surprising), we could make it
signal an error for "".

Alternatively, we could document in the doc string of those callers
that "" is equivalent to the buffer's default directory.



reply via email to

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