[Top][All Lists]

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

Re: file-relative-name and remote files

From: Lars Hansen
Subject: Re: file-relative-name and remote files
Date: Wed, 26 Feb 2003 10:41:00 +0100
User-agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2.1) Gecko/20021130

What do you mean by "reside in different trees"?
I use to think of files as making up a tree structure. Actually it is a
graph rather than tree, because of the possibility of links. What I mean
by "different trees" is what more accurately should be called
non-conneted graphs. As Stefan Monnier pointed out to me, I
misunderstood your last mail. I understand now that the files on eg.
galois.math.ku.dk should be thought of as part of the usual (local) tree
in the directory "/ssh:address@hidden/". There is, however, a
problem. Although  "/ssh:address@hidden:/../emacs/"
and "/emacs/../ssh:address@hidden:/" makes good sense in this
model, it does not work in Emacs:

(file-attributes "/address@hidden:/") =>
(t 21 0 0 (15679 61995) (15917 64402) (15917 64402) 624 "drwxr-xr-x" t
(0 . 2) (-1 0))

(file-attributes "/emacs/") =>
(t 1 123 123 (15592 11887) (15593 21299) (15593 21299) 0 "drwxrwxrwx"
nil 0 (7228 . 7896))

(file-attributes "/address@hidden:/../emacs") =>

(file-attributes "/emacs/../address@hidden:/") =>

It would be nice to make it work, but I guess it is not a small task.
IMHO we should add an optional parameter to file-relative-name
specifying whether files on different machines should be mapped into one
tree or not. If the option is set, I think DOS/windows drives should be
mapped into one tree as well. Eg. (file-relative-name "c:/file"
"d:/dir/) should return "../../c:/file".

reply via email to

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