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: autorevert.el Date: Fri, 12 Mar 2004 21:10:08 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200403130310.i2D3A8w28676@raven.dms.auburn.edu> References: <200403022319.i22NJbG01259@raven.dms.auburn.edu> <200403040508.i2458W811551@raven.dms.auburn.edu> <200403050400.i2540VQ21715@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1079149745 16725 80.91.224.253 (13 Mar 2004 03:49:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 13 Mar 2004 03:49:05 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat Mar 13 04:48:52 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 1B208q-0006yl-00 for ; Sat, 13 Mar 2004 04:48:52 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B208q-0006R6-00 for ; Sat, 13 Mar 2004 04:48:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B1zbq-0000Xz-5L for emacs-devel@quimby.gnus.org; Fri, 12 Mar 2004 22:14:46 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B1zZp-0000Bg-V1 for emacs-devel@gnu.org; Fri, 12 Mar 2004 22:12:42 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B1zZG-0008TL-LD for emacs-devel@gnu.org; Fri, 12 Mar 2004 22:12:38 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B1zZG-0008T2-0u for emacs-devel@gnu.org; Fri, 12 Mar 2004 22:12:06 -0500 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 i2D3BWKt017494; Fri, 12 Mar 2004 21:11:32 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i2D3A8w28676; Fri, 12 Mar 2004 21:10:08 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: teirllm@dms.auburn.edu In-reply-to: <200403050400.i2540VQ21715@raven.dms.auburn.edu> (message from Luc Teirlinck on Thu, 4 Mar 2004 22:00:31 -0600 (CST)) 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:20373 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20373 Three weeks ago a (without further changes) for all practical purposes unusable, patch to autorevert.el, to make dired buffers as well as some other non-file buffers autorevert, was applied. I proposed changes that would make the dired part completely functional. I have tested those changes for three weeks now, not only in routine, but also in various rather extreme situations and I never encountered any problems. I do find autoreverting dired buffers useful. Nevertheless, there _are_ potential severe problems with autoreverting non-file, non-vc, non-dired buffers. *Only* the fact that many non-file buffers mark themselves modified even though the _user_ never modified them, saves the non-file autoreverting from complete disaster (by preventing it from kicking in). Currently non-file autoreverting applies to all non-file buffers with a revert-buffer-function. But many revert-buffer-function's were not written to be called by auto-revert. Some pop up buffers. For instance the buffer-menu uses a revert-buffer-function that is just `list-buffers' with two dummy arguments. *Fortunately*, the buffer-menu marks its buffer modified so it does _not_ get auto-reverted. I tried to change the buffer-menu so it no longer marked its buffer modified. With auto-reverting of non-file buffers enabled, Emacs became unusable because *Buffer List* kept continuously popping up. Stefan had one objection to my original patch. The fact that I used a variable, `auto-revert-flag' to prevent dired from displaying its usual "Reading directory /home/teirllm/...done" messages which otherwise can occasionally get so noisy that they are not only excessively distracting but interfere with normal minibuffer usage. Stefan proposed to instead get rid of these messages completely. So a first question is: What do people think of just completely getting rid of these dired "Reading directory /home/teirllm/...done" messages? The second question is: How do we prevent autorevert.el from using inappropriate revert-buffer-function's? One, trivial to implement, possibility, would be an `auto-revert-buffer-function' for non-file, non-vc, non-dired buffers, which could always, of course, just be set to the regular revert-buffer-function if appropriate. The buffer would only get auto-reverted by global-auto-revert-mode if `auto-revert-buffer-function' is non-nil. Or else we could just stick to autoreverting dired and vc-buffers and give up on other non-file buffers altogether. But the current situation is just to dangerous. There are disasters waiting to happen. If we are actually going to seriously implement auto-reverting for non-file, non-vc, non-dired buffers (actually it _already_ is implemented right now in a very dangerous way) then I probably might eventually need that `auto-revert-flag' variable Stefan objects to anyway, in order to use the same function as both revert-buffer-function and auto-revert-buffer-function. Would anybody actually find auto-reverting the buffer-menu useful? It might be a good test case, but I do not know whether it really would be useful enough. Or are there any other non-file, non-vc, non-dired buffers people would like to autorevert? Sincerely, Luc.