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: Thu, 17 Jan 2013 18:54:51 +0200 Message-ID: <83vcav7ns4.fsf@gnu.org> References: <878v819kok.fsf@gmx.de> <83fw28uj9c.fsf@gnu.org> <8338y7vkyx.fsf@gnu.org> <87libzn4qt.fsf@gmx.de> <87pq1b2vdf.fsf@gmx.de> <838v7ytzbv.fsf@gnu.org> <87zk0esexv.fsf@gmx.de> <83mwwesajm.fsf@gnu.org> <87sj6087yl.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1358441708 25671 80.91.229.3 (17 Jan 2013 16:55:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jan 2013 16:55:08 +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 Thu Jan 17 17:55:25 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 1TvskO-0000zB-Dn for ged-emacs-devel@m.gmane.org; Thu, 17 Jan 2013 17:55:24 +0100 Original-Received: from localhost ([::1]:47741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvsk7-0005jd-Kg for ged-emacs-devel@m.gmane.org; Thu, 17 Jan 2013 11:55:07 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:52981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvsjy-0005cH-WE for emacs-devel@gnu.org; Thu, 17 Jan 2013 11:55:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tvsjx-0006Uq-IE for emacs-devel@gnu.org; Thu, 17 Jan 2013 11:54:58 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:45971) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvsjx-0006UX-AY for emacs-devel@gnu.org; Thu, 17 Jan 2013 11:54:57 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MGS00D0049NMR00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Thu, 17 Jan 2013 18:54:46 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MGS00DJH4B9D0B0@a-mtaout21.012.net.il>; Thu, 17 Jan 2013 18:54:46 +0200 (IST) In-reply-to: <87sj6087yl.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.169 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:156445 Archived-At: > From: Michael Albinus > Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org > Date: Thu, 17 Jan 2013 10:38:58 +0100 > > Eli Zaretskii writes: > > Hi Eli, > > > Tracing what happens when I type "M-x revert-buffer RET yes RET", I > > see that the watch is removed (as result of kill-buffer-hook) and then > > a new watch is started. Is this intended? > > Should be fixed in revno#111542. Thanks, it is indeed fixed according to my limited testing. > When I enter my next free time slot, I'll try to change the > implementation watching directories only also for the inotify case. Thanks. > And I do not know, what happens with w32notify in the current > implementation, if you start auto-reverting of 2 files located in the > same directory. Does it work, or are there errors? It works, after I change this: (defvar auto-revert-notify-watch-descriptor nil to use defvar-local instead. Without that, auto-revert-notify-watch-descriptor is globally visible, so no more than a single file can be autoreverted via notifications, even if the other files are in different directories. Other than that, why did you think it might not work? Each file gets its own watch machinery and resources, and while both watches are reporting the same low-level events, the filtering by file name in autorevert.el does its job well, and each buffer gets only the events it is interested in.