[Top][All Lists]

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

Re: testing for a remote file to include file on a Windows mappeddrive

From: Michael Albinus
Subject: Re: testing for a remote file to include file on a Windows mappeddrive
Date: Tue, 05 Feb 2008 16:52:50 +0100
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux)

Stefan Monnier <address@hidden> writes:

>> But:
>>   (file-relative-name "/sudo::/var/syslog/syslog.log" "/ssh::")
>>     => "/sudo:address@hidden:/var/syslog/syslog.log"
>> This is correct, but inconvenient.
> No, it's very convenient: file-name-absolute-p will then tell you if the
> process can reach those files.

There might be cases where this is still not sufficient. Think about a
Samba server, which offers several "shares" one cannot simply navigate
via `file-relative-name'. But given that the "smb" method of Tramp
does not support `process-file' and `start-file-process' (yet?), it
might be a good approximation to check for `file-name-absolute-p'.

>> I agree. It doesn't make sense for Tramp and ange-ftp, guessing what
>> might be a good default directory for `call-process' and `start-process'.
>> They shall simply apply `ignore'; alternatively it shall not be called
>> per file-name-handler.
> Not all file handlers are like Tramp: jka-compr and several others only
> modify the way files are accessed, rather than providing access to
> more files.  So it still needs to be a file-name-handler.

If I've checked correctly, only ange-ftp.el, tramp.el and
url-handlers.el offer an own implementation of
`unhandled-file-name-directory'. It might not be necessary to delegate
the implementation to those packages; the case of "remoteness" could
be handled directly in Funhandled_file_name_directory.

OTOH, it might be the best to keep the implementation as-it-is; "never
touch ..." etc pp.

Just being curious: url-handlers.el misses an own implementation of
`file-remote-p'; shouldn't it be there?

>         Stefan

Best regards, Michael.

reply via email to

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