emacs-devel
[Top][All Lists]
Advanced

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

Re: auto-revert-mode and tramp file handlers


From: Kai Grossjohann
Subject: Re: auto-revert-mode and tramp file handlers
Date: Mon, 10 May 2004 15:17:05 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux)

Luc Teirlinck <address@hidden> writes:

> A problem is that tramp seems to handle functions like file-exists-p
> and file-readable-p by trying to connect for 60 seconds and then
> throwing an error if the connection has been closed.  I believe that
> both functions strictly speaking should return nil in the given
> situation.  In the case of file-exists-p that is because it is
> impossible to figure out the file's attributes.  From the Elisp
> manual:
>
>  -- Function: file-exists-p filename
> This function returns `t' if a file named FILENAME appears to exist.
> This does not mean you can necessarily read the file, only that
> you can find out its attributes.
>
> If there is no way to quickly check whether the connection has been
> closed, and if so, return nil instead of throwing an error, then I
> believe that maybe we should just disable auto-reverting for remote
> files.  (This is trivial, using `file-remote-p'.)  I believe that at
> the very least there should be an option to disable auto-reverting for
> remote files, because it can be very costly for people with slow
> connections.

I'm not sure how to change Tramp to make this better: it often happens
that a connection is closed merely because a timeout has expired.  In
that case, just silently reopening the connection appears to be the
right approach.  But I confess that I haven't thought a lot about your
problem.  So it's quite likely that there are good solutions that I'm
not seeing.

But I do realize that there is a problem here.  Perhaps it is best to
make it easy for the user to customize "no auto-revert on remote
files".

What do people think?

Kai





reply via email to

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