Subject: Re: bug#26126: 26.0.50; file-notify-rm-watch removes arbitrary watches

From: Andreas Politz <[email-masked]>
Date: Tue, 21 Mar 2017 16:56:42 +0100

Michael Albinus <[email-masked]> writes:

> Andreas Politz <[email-masked]> writes:
>
>>>> Sure, the back-ends mostly watch directories, except for kqueue.  But is
>>>> this behavior also intended to be propagated to the clients of
>>>> filenotify.el ?

> We've discussed this a while ago, main reason (IIRC) was to achieve
> same behaviour for the different libraries.
>
> I cannot find the discussion just now, likely it was in one of the
> bugs. The main reason was the w32notify library, which works only
> watching directories.
>
> Later on we've added the kqueue library, which works reliably only
> watching files. This breaks the unification attempt, but I don't believe
> we shall change the behaviour again.

Ok, I try to find it, but note that this behavior was introduced with
the following (kqueue-only) commit

commit 7bf54d01159eb09bae3c9cd86f2af0812d9afdf6
Author: Michael Albinus <[email-masked]>
Date:   Fri Jan 22 19:56:09 2016 +0100

    Backport kqueue integration from master

Maybe we can work on unifying the behavior across back-ends at a later
time, while taking some pointers from other projects, e.g.
https://github.com/emcrisostomo/fswatch .

If it stays this way, it should probably be documented.

-ap