>>>> "Kai" == Kai Großjohann
<kai.grossjohann(a)gmx.net> writes:
Kai> Maybe you want to do this in XEmacs, too?
Kai> "Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
> Possibly. Why would such a path arise in practice?
Kai> Who's to know?
Well, since to my mind the semantics of looking up "~" for remote
hosts (which may not even grok the concept) are questionable, I'd like
to know where this is going. I think it's very reasonable to have a
facility which does completion etc on remote paths for interactive
use, but non-interactive, I don't know about that. I've never seen an
expand-file-name call wrapped in a condition-case. ;-) So I'd like
to see examples where it's useful, so I can wrap my brain around
intended semantics.
Also, I'm not sure that I agree that the proper interpretation of
"/x/../me@home.net:/~" is "/me@home.net:/home/me". That's mixing
two
different purely textual manipulations. It's so subtle I'm not even
sure it matters ... but it makes me nervous.
Kai> expand-file-name *is* a file operation.
As far I can tell from the documentation, it's intended to be an
operation on strings. It is not supposed to actually attempt to look
up the path on the system.
I suppose it's reasonable to interpret that you should look up the
user name on the remote system, but it's equally reasonable to
interpret that as an attempt to access the path (which is not
necessary for a local name; although lookups in /etc/passwd or
whatever access the file system, they do not attempt to access any
part of the path being computed, except / of course ;-). On systems
using NIS or similar, this might not even involve any file system
lookup by XEmacs at all!
Kai> ITYM "/me@home.net:~", with the leading slash?
Yes.
Kai> The behavior of expand-file-name in this case hasn't changed.
Blech. You're right.
I can only imagine that there are no practical non-interactive
situations in which this is desirable, or we would have had bug
reports about bogus net accesses when disconnected. (Note that in
that case expand-file-name will throw an error (I assume; it throws
one for a non-existent host) and thus if you have such an expression
in init.el, the init file breaks.) Lack of such reports (init file or
in general) suggests people hardly ever use this feature of
expand-file-name.
Anyway, you're obviously making things more consistent since EFS does
provide a handler for expand-file-name, and on that basis I won't
object to a patch to 21.5 if you or someone else submits one. (I may
however produce a counter-patch to avoid this behavior, at least to be
user-configurable.:-)
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.