Subject: Re: bug#66381: 29.1; Auto-revert not polling files when notifications are enabled

From: Eli Zaretskii <[email-masked]>
Date: Mon, 16 Oct 2023 15:38:26 +0300

> From: Michael Albinus <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Sun, 15 Oct 2023 15:58:56 +0200
> 
> - Use a mounted share. In my environment, "z:" is a Samba mount.
> 
> - Call
> 
> --8<---------------cut here---------------start------------->8---
> $ emacs -l filenotify --eval '(setq file-notify-debug t)' --eval '(file-notify-add-watch "z:/123" (quote (change attribute-change)) (quote ignore))'
> --8<---------------cut here---------------end--------------->8---
> 
> - In another shell outside Emacs, call
> 
> --8<---------------cut here---------------start------------->8---
> $ touch z:/123
> --8<---------------cut here---------------end--------------->8---
> 
> - You'll see in Emacs the messages
> 
> --8<---------------cut here---------------start------------->8---
> file-notify-handle-event (file-notify (541405157192 modified "123") file-notify--callback-w32notify)
> file-notify-callback 541405157192 changed "z:/123" nil #s(file-notify--watch "z:/" "123" ignore) "z:/123" "z:/"
> --8<---------------cut here---------------end--------------->8---
> 
> - Unmount the share. There shall be another file notification, but there
>   isn't.

On Windows, I cannot safely unmount the volume: Windows tells me that
it cannot be safely unmounted (because watching a filer on it has a
handle open on the volume).  If I unmount the volume forcibly, I see
what you expected me to see: nothing.

I guess this means the "cannot safely unmount" message will have to do
on MS-Windows.