unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* auto-revert-mode and tramp file handlers
@ 2004-05-09 17:34 Luc Teirlinck
  2004-05-10 13:17 ` Kai Grossjohann
  0 siblings, 1 reply; 7+ messages in thread
From: Luc Teirlinck @ 2004-05-09 17:34 UTC (permalink / raw)
  Cc: emacs-devel

>From one of my earlier messages:
   
   I do not know whether the following problem is connected to the update
   or not.

   Visit a file using the /ssh:USER@HOST:FILENAME syntax.  When the file
   is displayed, close your connection.  Obviously, now tramp is not
   going to be able to function normally anymore.  But what happens is
   that Emacs now appears to freeze.  It does not even respond to C-g
   anymore, and I had to kill it from the command line.  Is this really
   unavoidable?  Closing one's connection forgetting that one has active
   trap buffers _is_ sometimes going to happen, so the behavior is a
   nuisance.

The above only happens when auto-revert-mode is enabled.  (Again,
sorry for forgetting to double check using emacs -q).

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.

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-05-13 20:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-09 17:34 auto-revert-mode and tramp file handlers Luc Teirlinck
2004-05-10 13:17 ` Kai Grossjohann
2004-05-12  2:57   ` Luc Teirlinck
2004-05-12  4:35   ` Luc Teirlinck
2004-05-12  4:45   ` Luc Teirlinck
2004-05-12  7:18     ` Kai Grossjohann
2004-05-13 20:50       ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).