unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: bob@rattlesnake.com, kai@emptydomain.de, emacs-devel@gnu.org
Subject: Re: Feature freeze and Tramp?
Date: Sun, 9 May 2004 19:08:28 -0500 (CDT)	[thread overview]
Message-ID: <200405100008.i4A08SM04019@raven.dms.auburn.edu> (raw)
In-Reply-To: <jwvisf59xhv.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on 09 May 2004 16:11:17 -0400)

Stefan Monnier wrote:

   > auto-revert-mode causes the freeze.  This looks like a bug in
   > auto-revert-mode.  I will take a look at it and see whether I can fix it.

   The problem is likely to be that inhibit-quit is bound to non-nil while
   running timers (such as the auto-revert timer).  So you might want to
   wrap the auto-revert timer code with `with-local-quit'.

   But it would probably be better to use with-local-quit at the place where
   it's actually needed: around any potentially indefinitely blocking piece
   of code.  In this case it would be within Tramp around one of its calls
   to accept-process-output (or around one of the loops that calls
   accept-process-output).

I wrapped all relevant code with `with-local-quit'.  Now it is indeed
possible to quit, but the problem restarts 0 to auto-revert-interval
seconds later (as expected), unless one manages to kill all involved
buffers, or to disable Global Auto Revert Mode, in the meantime.

The trivial patch below completely solves the problem, but at the
expense of disabling the auto-reverting of remote files altogether.

The problem is that currently the Tramp handling of `file-exists-p'
and friends is very expensive if one has a slow connection, and
prohibitively expensive when not connected.  Indeed, then each single
call to `file-exists-p' and friends will take at least one full minute.

===File ~/autorevert-diff-1=================================
*** autorevert.el	04 Apr 2004 19:50:59 -0500	1.29
--- autorevert.el	09 May 2004 13:57:03 -0500	
***************
*** 311,316 ****
--- 311,317 ----
    (unless (buffer-modified-p)
      (let ((buffer (current-buffer)) revert eob eoblist)
        (or (and buffer-file-name
+ 	       (not (file-remote-p buffer-file-name))
  	       (file-readable-p buffer-file-name)
  	       (not (verify-visited-file-modtime buffer))
  	       (setq revert t))
============================================================

  reply	other threads:[~2004-05-10  0:08 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-02 18:43 Feature freeze and Tramp? Kai Grossjohann
2004-05-02 19:19 ` David Kastrup
2004-05-03  6:20   ` Eli Zaretskii
2004-05-03  6:03 ` Kim F. Storm
2004-05-03 14:03 ` Richard Stallman
2004-05-07 21:23 ` Kai Grossjohann
2004-05-07 22:22   ` Miles Bader
2004-05-08 10:15     ` Kai Grossjohann
2004-05-10  1:33       ` Miles Bader
2004-05-10  1:39       ` Miles Bader
2004-05-08  2:34   ` Luc Teirlinck
2004-05-08 10:34     ` Kai Grossjohann
2004-05-09  1:40       ` Luc Teirlinck
2004-05-10 13:02         ` Kai Grossjohann
2004-05-11  2:49           ` Luc Teirlinck
2004-05-11  7:08             ` Kai Grossjohann
2004-05-12  0:53               ` Luc Teirlinck
2004-05-12  1:02               ` Luc Teirlinck
2004-05-12  7:32                 ` Kai Grossjohann
2004-05-12 14:57                   ` Luc Teirlinck
2004-05-13  6:54                     ` Kai Grossjohann
2004-05-13 14:02                       ` Luc Teirlinck
2004-05-15 16:36                         ` Kai Grossjohann
2004-05-15 18:28                           ` Luc Teirlinck
2004-05-16  9:07                             ` Kai Grossjohann
2004-05-17  0:50                               ` Luc Teirlinck
2004-05-17  5:11                                 ` Kai Grossjohann
2004-05-08  3:15   ` Luc Teirlinck
2004-05-09  2:11   ` Luc Teirlinck
2004-05-09 15:35     ` Robert J. Chassell
2004-05-09 16:26       ` Luc Teirlinck
2004-05-09 20:11         ` Stefan Monnier
2004-05-10  0:08           ` Luc Teirlinck [this message]
2004-05-09  2:34   ` Luc Teirlinck
2004-05-09  2:53     ` Luc Teirlinck

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=200405100008.i4A08SM04019@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=bob@rattlesnake.com \
    --cc=emacs-devel@gnu.org \
    --cc=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 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).