emacs-devel
[Top][All Lists]
Advanced

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

Re: file-exists-p on empty string


From: Michael Albinus
Subject: Re: file-exists-p on empty string
Date: Wed, 06 Mar 2019 10:51:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>> So the (not (string-empty-p fn)) test just reflects the tool's semantics
>>> and is not an artifact of some suboptimal behavior of file-exists-p.
>> I gree, but there is not a line about empty strings in doc-string.
>> It is great that this is mentioned in documentation, but anyway
>> behaviour was quite unexpected
>
> The problem is that docstrings describe the behavior of a specific
> function, so they usually don't mention the more general aspects that
> affect all functions of a given subsystem, such as here the general
> treatment of the empty string when used as a file name.
>
> Otherwise, every file-name-manipulating function would have to repeat
> this information in its docstring.

What about the appended patch? It does not touch the docstrings, but it
explains the situation more verbose in the Lisp manual.

>         Stefan

Best regards, Michael.

Attachment: txtcTjoVWV4ti.txt
Description: Text Data


reply via email to

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