From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: File watch support in autorevert.el Date: Thu, 17 Jan 2013 20:19:49 +0100 Message-ID: <87mww7r50q.fsf@gmx.de> 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> <83vcav7ns4.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1358450413 17893 80.91.229.3 (17 Jan 2013 19:20:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Jan 2013 19:20:13 +0000 (UTC) Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 17 20:20:31 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 1Tvv0n-0000PZ-8x for ged-emacs-devel@m.gmane.org; Thu, 17 Jan 2013 20:20:29 +0100 Original-Received: from localhost ([::1]:47224 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvv0W-0004n5-El for ged-emacs-devel@m.gmane.org; Thu, 17 Jan 2013 14:20:12 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvv0Q-0004jw-8V for emacs-devel@gnu.org; Thu, 17 Jan 2013 14:20:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tvv0M-0005U9-CC for emacs-devel@gnu.org; Thu, 17 Jan 2013 14:20:06 -0500 Original-Received: from mout.gmx.net ([212.227.15.19]:65266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tvv0M-0005Rs-2x for emacs-devel@gnu.org; Thu, 17 Jan 2013 14:20:02 -0500 Original-Received: from mailout-de.gmx.net ([10.1.76.12]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MCeiK-1TnhXh3NOE-009S1Q for ; Thu, 17 Jan 2013 20:19:59 +0100 Original-Received: (qmail invoked by alias); 17 Jan 2013 19:19:58 -0000 Original-Received: from p57BB9718.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.151.24] by mail.gmx.net (mp012) with SMTP; 17 Jan 2013 20:19:58 +0100 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1/khlZ31fLkwhMXOZkEbWgJxSEcZcjotXFHMmfVUy rQu34YMKjr12dD In-Reply-To: <83vcav7ns4.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 17 Jan 2013 18:54:51 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.15.19 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:156452 Archived-At: Eli Zaretskii writes: >> 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. Ahh, thanks. This was damaged with the patch of last Saturday by accident; I've fixed it in the trunk. > 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. The point is that every file being watched should have a different watch descriptor. Otherwise, an *-rm-watch command for a given file would stop watching all files in the same directory. Good to know that there's no problem with w32notify. For inotify, I need to implement such mechanism, likely. Best regards, Michael.