[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#57102: 29.0.50; Peculiar file-name-split edge case
From: |
Stefan Kangas |
Subject: |
bug#57102: 29.0.50; Peculiar file-name-split edge case |
Date: |
Mon, 26 Sep 2022 07:14:56 -0400 |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> I also note that we have `string-split' and `string-join', but
>> `file-name-split' and `file-name-concat'. I think `file-name-join'
>> would be a better name.
>
> I think that makes sense...
>
>> We should leave behind an alias if we rename it of course, perhaps
>> forever.
>
> An obsolete alias?
Sure.
But, thinking more about this, maybe we would want a new function.
Because this is not fun:
(apply #'file-name-concat (file-name-split "/foo/bar"))
=> "foo/bar"
I'd like it better if it worked like this:
(file-name-join (file-name-split "/foo/bar"))
=> "/foo/bar"
And then there are the issues Mattias has pointed out. One small step
in the right direction would be to make sure that:
(equal (file-name-split "/foo")
(file-name-split "//foo"))
- bug#57102: 29.0.50; Peculiar file-name-split edge case, Stefan Kangas, 2022/09/25
- bug#57102: 29.0.50; Peculiar file-name-split edge case, Lars Ingebrigtsen, 2022/09/26
- bug#57102: 29.0.50; Peculiar file-name-split edge case,
Stefan Kangas <=
- bug#57102: 29.0.50; Peculiar file-name-split edge case, Lars Ingebrigtsen, 2022/09/26
- bug#57102: 29.0.50; Peculiar file-name-split edge case, Mattias EngdegÄrd, 2022/09/26
- bug#57102: 29.0.50; Peculiar file-name-split edge case, Gregory Heytings, 2022/09/26
- bug#57102: 29.0.50; Peculiar file-name-split edge case, Richard Stallman, 2022/09/28
- bug#57102: 29.0.50; Peculiar file-name-split edge case, Eli Zaretskii, 2022/09/29