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: Michael Albinus
Subject: Re: File watch support in autorevert.el
Date: Thu, 17 Jan 2013 20:19:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Eli Zaretskii <address@hidden> 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.



reply via email to

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