[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43375: 26.1: file-directory-p returns t for empty string
From: |
Eli Zaretskii |
Subject: |
bug#43375: 26.1: file-directory-p returns t for empty string |
Date: |
Sun, 13 Sep 2020 18:01:51 +0300 |
> Date: Sun, 13 Sep 2020 10:39:43 -0400
> From: Boruch Baum <boruch_baum@gmx.com>
> Cc: 43375@debbugs.gnu.org
>
> > > (file-directory-p "")
> >
> > This is not a bug, as Emacs always works with expanded and canonicalized
> > file names (the result of applying expand-file-name).
>
> Then the docstring could be clearer and say "Return t if the expansion
> of FILENAME names an existing directory"
That's not a useful doc string, because "expansion of FILENAME" is not
well defined, and is not easy to describe.
I'm okay with making the doc string more clear, but let's please think
about a more useful amendment. A doc string should help the user
understand what will/did happen, it shouldn't present puzzles.