GNU bug report logs - #66381
29.1; Auto-revert not polling files when notifications are enabled

Previous Next

Package: emacs;

Reported by: Daniel Jacobowitz <daniel.jacobowitz <at> gmail.com>

Date: Sat, 7 Oct 2023 01:27:03 UTC

Severity: normal

Found in version 29.1

Fixed in version 30.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Daniel Jacobowitz <daniel.jacobowitz <at> gmail.com>
Cc: 66381 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: bug#66381: 29.1; Auto-revert not polling files when notifications are enabled
Date: Tue, 10 Oct 2023 20:03:48 +0200
Daniel Jacobowitz <daniel.jacobowitz <at> gmail.com> writes:

Hi Daniel,

> First of all, for anyone who stumbles on this, inotifywait's
> documentation says it listens to all events by default. But it doesn't
> request IN_UNMOUNT unless you use `-e unmount`.

Noted.

> I built a patched emacs and tried unmounting the filesystem. Emacs was notified:
>
> file-notify-handle-event (file-notify ((1 . 0) (unmount isdir)
> "/google/src/cloud/dmj/emacs/google3" 0)
> file-notify--callback-inotify)
> file-notify-handle-event (file-notify ((1 . 0) stopped
> "/google/src/cloud/dmj/emacs/google3/file.txt")
> auto-revert-notify-handler)
> auto-revert-notify-handler ((1 . 0) stopped
> "/google/src/cloud/dmj/emacs/google3/file.txt")
> file-notify-handle-event (file-notify ((1 . 0) stopped
> "/google/src/cloud/dmj/emacs/google3/file.txt")
> auto-revert-notify-handler)
> auto-revert-notify-handler ((1 . 0) stopped
> "/google/src/cloud/dmj/emacs/google3/file.txt")
> file-notify-handle-event (file-notify ((1 . 0) (ignored)
> "/google/src/cloud/dmj/emacs/google3" 0)
> file-notify--callback-inotify)
>
> It works! Thanks!

Thanks for the feedback.

I've checked the other file notification backends, and it turns out,
that none of them reports unmount events. So I have extended the patch,
the unmount event is propagated now in all backends (under different
event names), and it causes to stop the respective file notification
watch.

This works for all but the w32notify backend. I dont know whether this
library supports a kind of unmount events, and even in case it does, I
wouldn't be able to implement this. Eli, do we want to do something
here?

Everything is pushed to the master branch. Perhaps we could also add a
test case to filenotify-tests.el, but I have no idea how to emulate
unmounting in a test environment.

Best regards, Michael.




This bug report was last modified 1 year and 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.