From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Always reread some files Date: Mon, 02 Dec 2002 15:26:37 -0700 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <3DEBDE1D.6070209@ihs.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1038868227 22739 80.91.224.249 (2 Dec 2002 22:30:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 2 Dec 2002 22:30:27 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Iz53-0005uG-00 for ; Mon, 02 Dec 2002 23:30:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Iz5m-0008JW-00; Mon, 02 Dec 2002 17:31:06 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!skynet.be!skynet.be!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: 170.207.51.80 Original-X-Trace: fu-berlin.de 1038867996 26117370 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:107672 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:4222 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4222 Frédéric Bothamy wrote: > * arthur.chereau [2002-11-29 15:25] : > >>>>I always want to reread those files. >>>> >>>auto-revert-mode >>> >>> >>Unfortunately this doesn't work because the *.log files buffers are opened immediately after their modification, that is: >>- I compile >>- a .log file is created >>- I open the .log file >>- I recompile >>- the .log file is modified >>- I open the .log file buffer (immediately, so auto-revert is too slow for that) >>- Emacs asks me if it should reread the .log file >>- auto-revert reverts the file, but it's too late >> >>That's why I would like to disable the revert question for all *.log files. >> > > Maybe use the variable revert-without-query using a regexp like this : > ".+\.log$" and set a lower auto-revert-interval (5 by default). Or perhaps: ;; Warning: Untested! (defadvice revert-buffer (before yes activate) "Always revert buffers visiting *.log files (without querying)." (if (and buffer-file-name (string-match "\\.log\\'" buffer-file-name)) (setq unread-command-events '(?y ?e ?s ?\r)))) -- Kevin Rodgers