Subject: Re: bug#16519: 24.3.50; gfile notifications not received in batch mode

From: Michael Albinus <[email-masked]>
Date: Mon, 27 Jan 2014 17:08:35 +0100

Michael Albinus <[email-masked]> writes:

> I don't know what it needs on w32 to get the file notification
> events. Is it sit-for?

Finally, the following seems to work for all three file notification
libraries in interactive mode, and for inotify in batch mode:

(defmacro file-notify--wait-for-events (timeout until)
  "Wait for file notification events until form UNTIL is true.
TIMEOUT is the maximum time to wait for, in seconds."
  `(with-timeout (,timeout (ignore))
     (while (null ,until)
       (let (noninteractive)
        (sit-for 0.1 'nodisplay)))))

I am not able to test w32notify in batch mode. The following call from a
CMD terminal works fine for me:

C:\>"C:\Program Files\emacs\bin\runemacs.exe" -Q -l Y:\file-notify-tests.el -f ert

However, the batch-mode equivalent returns immediately without running
the test:

C:\>"C:\Program Files\emacs\bin\runemacs.exe" -batch -Q -l Y:\file-notify-tests.el -f ert-run-tests-batch-and-exit

What do I miss?

Best regards, Michael.