bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25183: 26.0.50; expanding quoted file name on w32


From: npostavs
Subject: bug#25183: 26.0.50; expanding quoted file name on w32
Date: Sat, 24 Dec 2016 08:57:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> I looked into this, and I indeed think there might be a problem here.
> I agree that "~" should not be expanded for file names escaped with
> "/:", but before I propose a solution, I think we should decide
> whether the "/:" escape should cause the rest be expanded "as usual",
> i.e. produce an absolute file name after "/:" for local file names,
> minus the "~" expansion.  Currently, Unix file names are not expanded
> because '/' as the first character makes them look as absolute file
> names.  MS-Windows specific code, OTOH, looks under the hood, and does
> expand the rest.
>
> IOW, the question is whether on Windows we should have this:
>
>   (expand-file-name "/:~/path/./file") => "/:c:/~/path/file"
>
> or this:
>
>   (expand-file-name "/:~/path/./file") => "/:~/path/file"
>
> If we want the former, then maybe the Unix code should be fixed to
> produce "/:/~/path/file" in that case.
>
> Thoughts?

If we want to extend the /: quoting to also apply to relative file names
too, then the latter makes sense.  Otherwise, the only consistent result
would be

    (expand-file-name "/:~/path/./file") => (error "/: quoting relative file 
name")

As I've said in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25183#29,
currently "/:~/foo" is a kind of paradoxical file name, being
both/neither relative nor absolute.





reply via email to

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