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: new tail-mode Date: Thu, 15 Jul 2004 19:30:15 -0500 (CDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200407160030.i6G0UEg08118@raven.dms.auburn.edu> References: <20040610095025.13f91ac1.occitan@esperanto.org> <40E1D618.4040408@onlinehome.de> <20040703155128.7fa0da2a@pfdabpc.inhouse.start.de> <20040704124113.43b41a42@pfdabpc.inhouse.start.de> <20040705213402.04eb3175@pfdabpc.inhouse.start.de> <20040707213739.7a6193ea@pfdabpc.inhouse.start.de> <20040710201400.01ee8495@pfdabpc.inhouse.start.de> <20040714002235.50f21f39@pfdabpc.inhouse.start.de> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1089938029 12562 80.91.224.253 (16 Jul 2004 00:33:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 16 Jul 2004 00:33:49 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Jul 16 02:33:42 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 1BlGfW-0000m3-00 for ; Fri, 16 Jul 2004 02:33:42 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BlGfV-0001v5-00 for ; Fri, 16 Jul 2004 02:33:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BlGi1-0007H7-16 for emacs-devel@quimby.gnus.org; Thu, 15 Jul 2004 20:36:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BlGhs-0007H1-V3 for emacs-devel@gnu.org; Thu, 15 Jul 2004 20:36:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BlGhr-0007Gp-Cu for emacs-devel@gnu.org; Thu, 15 Jul 2004 20:36:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BlGhr-0007Gm-9Y for emacs-devel@gnu.org; Thu, 15 Jul 2004 20:36:07 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BlGfG-0004jz-Nn; Thu, 15 Jul 2004 20:33:26 -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 i6G0X3uE001825; Thu, 15 Jul 2004 19:33:03 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i6G0UEg08118; Thu, 15 Jul 2004 19:30:15 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: occitan@esperanto.org In-reply-to: <20040714002235.50f21f39@pfdabpc.inhouse.start.de> (dapfy@t-online.de) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 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:25741 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:25741 The Commentary of autorevert.el now contains: ;; Go to the appropriate buffer and press either of: ;; M-x auto-revert-mode RET ;; M-x auto-revert-tail-mode RET without any prior mention of `auto-revert-tail-mode'. This is confusing. What about the patch below? I can install it if it looks OK. In as far as the proposed code change is concerned, I do not understand what the `auto-revert-tail-mode' which the patch removes is doing at that place. At this stage we know that the buffer is not visiting a file, so `auto-revert-tail-mode' should be nil. The only situation in which it could be t is if the user first enables `auto-revert-tail-mode' and then explicitly makes the buffer visit no file, a strange thing to do. If this situation would be worth worrying about at all, which is not obvious, then the thing to do would seem to disable `auto-revert-tail-mode' and print a message to that effect. The patch below does not do that. ===File ~/auto-revert-diff================================== *** autorevert.el 14 Jul 2004 16:36:00 -0500 1.35 --- autorevert.el 15 Jul 2004 16:59:47 -0500 *************** *** 34,40 **** ;; ;; This package contains two minor modes: Global Auto-Revert Mode and ;; Auto-Revert Mode. Both modes automatically revert buffers ! ;; whenever the corresponding files have been changed on disk. ;; ;; Auto-Revert Mode can be activated for individual buffers. Global ;; Auto-Revert Mode applies to all file buffers. (If the user option --- 34,41 ---- ;; ;; This package contains two minor modes: Global Auto-Revert Mode and ;; Auto-Revert Mode. Both modes automatically revert buffers ! ;; whenever the corresponding files have been changed on disk and the ! ;; buffer contains no unsaved changes. ;; ;; Auto-Revert Mode can be activated for individual buffers. Global ;; Auto-Revert Mode applies to all file buffers. (If the user option *************** *** 59,64 **** --- 60,72 ---- ;; Just put point at the end of the buffer and it will stay there. ;; These rules apply to file buffers. For non-file buffers, the ;; behavior may be mode dependent. + ;; + ;; While you can use Auto Revert Mode to tail a file, this file + ;; contains a third minor mode, Auto Revert Tail Mode, which does so + ;; more efficiently, as long as you are sure that the file will only + ;; change by growing at the end. It only appends the new output, + ;; instead of reverting the entire buffer. It does so even if the + ;; buffer contains unsaved changes. (Because they will not be lost.) ;; Usage: ;; *************** *** 389,395 **** (not (file-remote-p buffer-file-name)) (file-readable-p buffer-file-name) (not (verify-visited-file-modtime buffer))) ! (and (or auto-revert-mode auto-revert-tail-mode global-auto-revert-non-file-buffers) revert-buffer-function (boundp 'buffer-stale-function) --- 397,403 ---- (not (file-remote-p buffer-file-name)) (file-readable-p buffer-file-name) (not (verify-visited-file-modtime buffer))) ! (and (or auto-revert-mode global-auto-revert-non-file-buffers) revert-buffer-function (boundp 'buffer-stale-function) ============================================================