From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Feature freeze and Tramp? Date: Sun, 9 May 2004 19:08:28 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200405100008.i4A08SM04019@raven.dms.auburn.edu> References: <87zn8qlleb.fsf@emptyhost.emptydomain.de> <87d65gj5j2.fsf@emptyhost.emptydomain.de> <200405090211.i492B2S28986@raven.dms.auburn.edu> <200405091626.i49GQwF01227@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1084148132 29398 80.91.224.253 (10 May 2004 00:15:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 May 2004 00:15:32 +0000 (UTC) Cc: bob@rattlesnake.com, kai@emptydomain.de, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 10 02:15:23 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMyS3-0001qB-00 for ; Mon, 10 May 2004 02:15:23 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMyS2-0000BC-00 for ; Mon, 10 May 2004 02:15:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMyQQ-0001Zm-3X for emacs-devel@quimby.gnus.org; Sun, 09 May 2004 20:13:42 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BMyPe-0001SD-LR for emacs-devel@gnu.org; Sun, 09 May 2004 20:12:54 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BMyP2-00018Q-VI for emacs-devel@gnu.org; Sun, 09 May 2004 20:12:49 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMyP2-00017k-6N for emacs-devel@gnu.org; Sun, 09 May 2004 20:12:16 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i4A0CETS011357; Sun, 9 May 2004 19:12:14 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i4A08SM04019; Sun, 9 May 2004 19:08:28 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: monnier@iro.umontreal.ca In-reply-to: (message from Stefan Monnier on 09 May 2004 16:11:17 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23005 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23005 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)) ============================================================