emacs-devel
[Top][All Lists]
Advanced

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

Re: file-relative-name and remote files


From: Richard Stallman
Subject: Re: file-relative-name and remote files
Date: Mon, 24 Feb 2003 11:38:22 -0500

    > file-relative-name assumes that filename and directory is part of the
    > same tree except when we are on a DOS/Windows system and the first two
    > chars in the expanded file names (the drive) are not equal. This
    > approach does not work with remote files. With remote files filename
    > and directory may reside in different trees.

Could someone please supply an example, so we can see if that is really
true?  I have doubts about it.  A remote file name in Emacs is simply
an absolute file name whose first component is special.  Ordinary relative
names ought to work for them.

It is possible that it might be preferable to return FILENAME unchanged
in the case where it and DIRECTORY are on different hosts.
If so, there is no need for a new file operation.
You can use file-remote-p to see if either one is remote.
Then you can see if the names have the same first component.




reply via email to

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