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: Stefan Monnier
Subject: Re: file-exists-p on empty string
Date: Wed, 27 Feb 2019 16:18:48 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> 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.


        Stefan




reply via email to

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