--- Begin Message ---
Subject: |
[PATCH] Don't poll auto-revert files that use notification |
Date: |
Wed, 24 Apr 2019 20:14:46 +0200 |
It is a waste of power, on battery-powered devices in particular, to poll files
in auto-revert mode periodically when change notification is used. The change
is straightforward (attached patch); the main concern is whether the
notification system is reliable enough.
In general, it probably is. There is a comment in w32notify.c about SMB-mounted
file systems from Samba servers; while Samba does support notification
nowadays, there are probably older systems still be deficient in that regard.
However, isn't this what `auto-revert-notify-exclude-dir-regexp' is for? I'm
not familiar with the way Emacs is used on Windows, but would adding something
like
(rx bos
(or "\\\\" "//")
(one-or-more (not (any "/:\\")))
(any "/\\"))
to `auto-revert-notify-exclude-dir-regexp' be a good start?
Another note about what this patch does not do: global-auto-revert-mode will
still use polling. This could be added later on, if there is a good place to
hook into for buffer creation.
0001-Don-t-poll-auto-revert-files-that-use-notification.patch
Description: Binary data
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#35418: [PATCH] Don't poll auto-revert files that use notification |
Date: |
Mon, 20 May 2019 21:19:37 +0200 |
20 maj 2019 kl. 09.30 skrev Michael Albinus <address@hidden>:
>
> From my POV, the patch is fine, and could be committed. Whether it is
> successful will be told us by emba.gnu.org (and hydra.nixos.org).
Thanks for your diligence and patience; closing.
--- End Message ---