[Top][All Lists]

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

Re: file-relative-name and remote files

From: Kai Großjohann
Subject: Re: file-relative-name and remote files
Date: Sun, 09 Mar 2003 14:36:23 +0100
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (gnu/linux)

Lars Hansen <address@hidden> writes:

>>That just doesn't make sense.  It neglects "~".  IMHO, a filename
>>such as "~/../bla" makes perfect sense, and I think that "~" should
>>be expanded first, before processing "..".
>>What do you think?
> I see your point. I did not take "~" into consideration. Clearly "~"
> should be processed before ".."'s and the file handler should process
> "~".

Glad to hear you agree.  I was thinking that I was overlooking

> I my opinion that means that everyting after "/foo:" should be handled
> as something on the remote machine. I.e. "/foo:/.." should expand to
> "/foo:/" and not to "/". And file-relative-name should return an absolute
> name when FILENAME and DIRECTORY are on different machines.

But Richard wants to allow ".." to cross file handler boundaries.
So "/foo:/../bar" should expand to "/bar", just like "/foo/../bar"

I think that means we're back to square one and we need to find out
how to deal with things like "/bla/../foo:/bar".  Hm.  Actually, that
expands to "/foo:/bar" which is fine.  But "/bla/../foo:../bar"
expands to "/foo:../bar" which is not fine -- it should be expanded

One approach that might work is this: if expand-file-name does not
find a handler, it does its thing and then looks again if it finds a
handler.  Then it invokes that.

(Maybe it is easier to implement the previous paragraph by saying,
after expand-file-name has done its thing in the non-handler case, it
just reinvokes itself.)
A preposition is not a good thing to end a sentence with.

reply via email to

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