[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36490: 26.1; directory-files-recursively breaks when it encounters a
From: |
Lars Ingebrigtsen |
Subject: |
bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~" |
Date: |
Wed, 10 Jul 2019 13:55:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> "~/" isn't something you'll ever get from functions like
>> directory-files
>
> That's sheer luck, because:
>
> (file-name-as-directory "~")
> => "~/"
>
> So just running "~" through an innocent API gives you a "magic"
> directory name (if you consider "~" not "magic" by itself). How is
> this different from the "odd" use case where one must quote "~" to
> avoid its interpretation as the home directory? Who can guarantee
> that some day directory-files-recursively will not want to do
> something like the above? If it does, we will be right back at the
> same problem.
Well... That kinda sounds odd to me.
"~/" is not, and never will be, a valid file name in any OS that Emacs
is going to support from now on. So having that have a special meaning
in `expand-file-name' is not surprising. Having "~" do something
special is surprising.
But changing that is probably not going to happen, so how about just
clarifying the documentation in that function to say what "~" means
explicitly instead of the caller having to guess?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", (continued)
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Eli Zaretskii, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Lars Ingebrigtsen, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Eli Zaretskii, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Lars Ingebrigtsen, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Eli Zaretskii, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Lars Ingebrigtsen, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Eli Zaretskii, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Lars Ingebrigtsen, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Eli Zaretskii, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Michael Albinus, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~",
Lars Ingebrigtsen <=
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Eli Zaretskii, 2019/07/10
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Lars Ingebrigtsen, 2019/07/11
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Basil L. Contovounesios, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Eli Zaretskii, 2019/07/09
- bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Andreas Schwab, 2019/07/09
bug#36490: 26.1; directory-files-recursively breaks when it encounters a directory named "~", Lars Ingebrigtsen, 2019/07/10