[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 22:24:12 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> Every such function _should_ have this info in
> its doc string. There's no reason not to.
> In terms of the _implementation_ this might be
> a "general aspect that affects all functions of
> a given subsystem". But in terms of the doc for
> a given such function this is not (only) a
> general subsystem aspect - it is part of the
> individual function's definition & description.
By the same reasoning, file-exists-p should explain that filenames are
represented as strings, and that if a file-name is not absolute it will
be interpreted according to default-directory, and that it is subject to
file-name-handlers-alist, and `file-attributes` should additionally
explain how &optional arguments are passed, ...
So, yes, there is a reason not to: it's because duplicating such info in
every docstrings is madness. Maybe a more sane way to provide a similar
information would be to make "filename" (in the docstring) into
a hyperlink to the Elisp refman that describes how file names work
(including things like "", file-name-handlers-alist, and default-directory).
Stefan
- Re: file-exists-p on empty string, (continued)
Re: file-exists-p on empty string, lg . zevlg, 2019/02/27
Re: file-exists-p on empty string, lg . zevlg, 2019/02/27