GNU bug report logs - #4823
w32 paths `substitute-in-file-name' fails when environmental variable is set for \\ style paths:

Previous Next

Package: emacs;

Reported by: MON KEY <monkey <at> sandpframing.com>

Date: Wed, 28 Oct 2009 20:25:05 UTC

Severity: normal

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 4823 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 4823 <at> debbugs.gnu.org, MON KEY <monkey <at> sandpframing.com>
Subject: Re: bug#4823: w32 paths `substitute-in-file-name' fails when environmental variable is set for \\ style paths:
Date: Wed, 28 Oct 2009 20:43:33 -0400
> According to the docstring of `substitute-in-file-name':

>   If `//' appears, everything up to and including the first of
>   those `/' is discarded.

Admittedly, I think substitute-in-file-name implements this feature
incorrectly, because the double-slash handling should be done before
envvar expansion (envvars ceom from outside Emacs usually, so they
generally rely on the convention that /foo///bar is equivalent to
/foo/bar rather than to /bar).

OTOH if an envvar holds "http://foo/bar", then we'd want to use
url-handler-mode's implementation of substitute-in-file-name, which
would argue for doing expansion early.  It's probably tricky to get it
to do the right thing in "all" cases.


        Stefan



This bug report was last modified 13 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.