GNU bug report logs -
#18891
Doesn't handle pwd = /C: very well
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Wed, 29 Oct 2014 20:04:01 UTC
Severity: minor
Found in version 24.4
Fixed in version 24.5
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Glenn Morris <rgm <at> gnu.org> writes:
> I don't consider a performance penalty an undesired side effect, but
> rather necessary to avoid a completely incorrect result, such as we have
> in this case.
The "unnecessary result" is an error in `file-attributes'.
>> (substitute-in-file-name "/C:/$FOO") requires the expansion of
>> $FOO. That's the task of Tramp, according to that file name. Nothing you
>> can check before invoking Tramp, because you don't know the value of $FOO.
>
> Why can't it be checked before Tramp?
>
> What if "FOO = foo" in the local environment, and "/C:/foo"
> is a real directory on the local machine?
`substitute-in-file-name' is an operation supporting file name
handlers. This handler must be called, instead of expanding an
environment variable locally. That's the design, and the promise by the
API.
Everything could be changed, of course. But please then with a
corresponding *design* change. And `substitute-in-file-name' was just
the very first example which came to my mind, without thinking about
seriously. There are many other operations supporting file name
handlers, which must be investigated for this kind of changes as well.
For the records: I do not oppose fundamentally such changes. I just
resist to change something on-the-fly, without redesign.
Best regards, Michael.
This bug report was last modified 10 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.