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: Stefan Monnier
Subject: Re: testing for a remote file to include file on a Windows mappeddrive
Date: Wed, 30 Jan 2008 12:49:30 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

>>> I'm lost. What do you expect as result of (nonmagic-file-name "/sudo::") ?
>> nil
>> because this directory is (most likely) not accessible to a subprocess
>> run locally by Emacs.

> And in the unlikely case, the user can access "/root" nonmagically, it
> shall return that string?

Since unhandled-file-name can return nil, the code that uses it has to
be able to deal with the case where the function returns nil (most
likely, it will use something like file-local-copy to make a copy that
can then be passed to the subprocess), so returning nil when the file is
actually accessible is suboptimal but correct and safe.

In other words, I'd rather just return nil even if /root happens to be
accessible because (who knows) the subprocess may actually need to write
to that directory.  And if /root is also available for write, then
I think this case is sufficiently unlikely or scary that returning nil
is good enough.


        Stefan




reply via email to

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