unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: auto-revert-mode and tramp file handlers
Date: Tue, 11 May 2004 23:45:47 -0500 (CDT)	[thread overview]
Message-ID: <200405120445.i4C4jle15322@raven.dms.auburn.edu> (raw)
In-Reply-To: <87isf4zajy.fsf@emptyhost.emptydomain.de> (message from Kai Grossjohann on Mon, 10 May 2004 15:17:05 +0200)

Kai Grossjohann wrote:

   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?

Not just auto-revert, but _very many_ places in the Emacs code call
file-exists-p and its many friends in situations where the file
usually is local but could be remote.  Usually, the purpose seems to
be to prevent a relatively time consuming operation and/or prevent an
error, in case the file does not exist (or is not readable or
whatever).  I do believe that in many of these places, the person who
put in those calls did not realize that that call could take more than
a full minute of real time, regardless of the CPU power of the
machine, and could then throw an error instead of returning nil if the
file "does not exist" (because of being unreachable).

One interpretation is that all such calls are bugs that one way or
the other should be fixed.  (Presumably by calling file-remote-p
before calling file-exists-p and friends, and doing something ad hoc
if the return value is t.)  Another interpretation is that a handler
for these functions should not take a full minute of real time and
should not throw an error when the docstring suggests a return value
of nil.

Is there no way that tramp could detect that the user is off line in a
fraction of a second (as ssh apparently can) and if so, return nil for
file-exists-p and other functions that expect a return value of nil in
this case?

Sincerely,

Luc.

  parent reply	other threads:[~2004-05-12  4:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2004-05-12  7:18     ` Kai Grossjohann
2004-05-13 20:50       ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200405120445.i4C4jle15322@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).