all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kai Grossjohann <kai@emptydomain.de>
Subject: Re: auto-revert-mode and tramp file handlers
Date: Mon, 10 May 2004 15:17:05 +0200	[thread overview]
Message-ID: <87isf4zajy.fsf@emptyhost.emptydomain.de> (raw)
In-Reply-To: 200405091734.i49HYRM01844@raven.dms.auburn.edu

Luc Teirlinck <teirllm@dms.auburn.edu> 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	other threads:[~2004-05-10 13:17 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 [this message]
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

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

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

  git send-email \
    --in-reply-to=87isf4zajy.fsf@emptyhost.emptydomain.de \
    --to=kai@emptydomain.de \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.