Subject: bug#18891: Doesn't handle pwd = /C: very well

From: Glenn Morris <[email-masked]>
Date: Tue, 04 Nov 2014 14:11:47 -0500

Michael Albinus wrote:

> There could be undesired side effects. File name handlers are invoked
> only if the file *name* matches a corresponding regexp, nothing else. If
> you want to make checks on the file system itself, it would result at
> least in performance penalties.

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.

> (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?