From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: File watch support in autorevert.el Date: Sat, 12 Jan 2013 13:28:36 +0200 Message-ID: <838v7ytzbv.fsf@gnu.org> References: <878v819kok.fsf@gmx.de> <83fw28uj9c.fsf@gnu.org> <8338y7vkyx.fsf@gnu.org> <87libzn4qt.fsf@gmx.de> <87pq1b2vdf.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1357990142 17084 80.91.229.3 (12 Jan 2013 11:29:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Jan 2013 11:29:02 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 12 12:29:20 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TtzH5-0007WV-TW for ged-emacs-devel@m.gmane.org; Sat, 12 Jan 2013 12:29:20 +0100 Original-Received: from localhost ([::1]:53539 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtzGp-0006P4-UM for ged-emacs-devel@m.gmane.org; Sat, 12 Jan 2013 06:29:03 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtzGk-0006Nx-Qd for emacs-devel@gnu.org; Sat, 12 Jan 2013 06:29:01 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtzGg-0005vJ-UI for emacs-devel@gnu.org; Sat, 12 Jan 2013 06:28:58 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:63879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtzGg-0005v0-Mu for emacs-devel@gnu.org; Sat, 12 Jan 2013 06:28:54 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MGI00M00EI3IW00@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Sat, 12 Jan 2013 13:28:12 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGI00MYKFV0J480@a-mtaout22.012.net.il>; Sat, 12 Jan 2013 13:28:12 +0200 (IST) In-reply-to: <87pq1b2vdf.fsf@gmx.de> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156259 Archived-At: > From: Michael Albinus > Cc: Eli Zaretskii , emacs-devel@gnu.org > Date: Fri, 11 Jan 2013 23:43:56 +0100 > > Stefan Monnier writes: > > > Try: > > > > while sleep 60; do echo hello; done >> ~/tmp/123 > > > > Look ma, no close! > > > > But you don't need a script: just try auto-revert-mode on a log written > > by syslogd. > > > > Admittedly, these cases are presumably clients of auto-revert-tail-mode, > > but auto-revert-mode should handle them correctly. > > Should be OK now for all 3 modes: global-auto-revert-mode, > auto-revert-mode and auto-revert-tail-mode (support for the last one is > just committed). For the inotify case, I've changed to IN_MODIFY as > supervised event. For w32notify, I have added size as proposed by Eli. Thanks. I tried auto-revert-mode and auto-revert-tail-mode on MS-Windows, and they both seem to work as expected (after I fixed the minor issues described in my other mail). I see only one problem: if you manually "M-x revert-buffer RET", a new file watch is added, although the old one is still active. AFAICS, you rely on the watch descriptor local var be non-nil for avoiding this, so perhaps revert-buffer reverts that variable as well? Or is this a Windows-only problem?