emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File watch support in autorevert.el


From: Eli Zaretskii
Subject: Re: File watch support in autorevert.el
Date: Thu, 17 Jan 2013 18:54:51 +0200

> From: Michael Albinus <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Thu, 17 Jan 2013 10:38:58 +0100
> 
> Eli Zaretskii <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]