emacs-devel
[Top][All Lists]
Advanced

[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: Sat, 26 Jan 2008 12:29:56 +0100
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> (let ((file-name-handlers-alist nil)) (file-readable-p <FILE>)).

(and (not (file-remote-p file)) (file-readable-p file))

There could be file name handlers, which have an own implementation of
file-readable-p for local files.

> I think file-remote-p should really give a kind of performance and
> reliability info: is the file available from local (i.e. fast and
> reliable) storage, or is it only available via a network access which
> may be slow and may fail.

file-remote-p returns information about the *file name*, and not
necessarily about the file: "Can the file name be used literally on the
local host?" I believe this meaning shall be kept, for example, it is
needed to determine whether a file name must be trimmed when used as
argument of process-file and alike.

The new function you are looking for is file-mounted-p or so.

>         Stefan

Best regards, Michael.




reply via email to

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