From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: auto-revert-mode and tramp file handlers
Date: Sun, 9 May 2004 12:34:27 -0500 (CDT) [thread overview]
Message-ID: <200405091734.i49HYRM01844@raven.dms.auburn.edu> (raw)
>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.
next reply other threads:[~2004-05-09 17:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-09 17:34 Luc Teirlinck [this message]
2004-05-10 13:17 ` auto-revert-mode and tramp file handlers 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
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=200405091734.i49HYRM01844@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 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.