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

From: Michael Albinus <[email-masked]>
Date: Sat, 18 Mar 2017 09:30:42 +0100

Andreas Politz <[email-masked]> writes:

> What I would do, is box the internal descriptor in file-notify-add-watch,
> to make it unique to the caller and unbox it in file-notify-rm-watch and
> file-notify-valid-p.  

Sounds OK to me. Do you want to do this only for inotify, or also for
the other backends?

> A different question is, whether file-notify-add-watch should behave
> like add-hook with regards to adding a function multiple times.  I don't
> think it does at the moment, so I probably leave it as such (?).

I believe adding the *same* function twice for the same file/directory
doesn't make sense. Maybe we should document this in the Elisp manual,
and test it also in `file-notify-test01-add-watch'.

> -ap

Best regards, Michael.