Subject: Re: bug#22534: File notify broken on Windows

From: Eli Zaretskii <[email-masked]>
Date: Sun, 07 Feb 2016 19:46:07 +0200

> From: Fabrice Popineau <[email-masked]>
> Date: Sun, 7 Feb 2016 14:37:34 +0100
> Cc: Michael Albinus <[email-masked]>, [email-masked]
> 
> In the 'check for attribute change', I see only 2 'changed' notifications, and not 4
> as expected by the test (around line 512: w32notify does not distinguish between 
> 'changed' and 'attribute-changed').
> 
> So I need to apply :
> 
> diff --git a/test/automated/file-notify-tests.el b/test/automated/file-notify-tests.el
> index 5fc4ff8..943bd7e 100644
> --- a/test/automated/file-notify-tests.el
> +++ b/test/automated/file-notify-tests.el
> @@ -507,7 +512,7 @@ file-notify--test-with-events
> ;; w32notify does not distinguish between `changed' and
> ;; `attribute-changed'.
> ((string-equal (file-notify--test-library) "w32notify")
> - '(changed changed changed changed))
> + '(changed changed))
> ;; For kqueue and in the remote case, `write-region'
> ;; raises also an `attribute-changed' event.
> ((or (string-equal (file-notify--test-library) "kqueue")

Can you instrument filenotify.el to show the w32notify events this
test generates, complete with the corresponding file names?  I will
then compare to what I see here.

> For the rest of this test, whereas the test passes in interactive mode, it fails in batch mode with
> several 'deleted' notifications. Namely, I need to apply the following for the test to pass.

Does it help to add a call to

  (read-event nil nil 0.1)

after the code that invokes the deletion in each of these cases?