Don't use file notification on non-file buffers
authorMattias Engdegård <mattiase@acm.org>
Tue, 7 May 2019 22:02:59 +0000 (00:02 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sat, 18 May 2019 12:16:21 +0000 (14:16 +0200)
commit1943220d1b7ed28b2708c86acfe5493d5c6e3089
tree463bdfba333ec0637376d9fe4fc144fbc07bde0d
parent4bf447bb912d73c4637f1094c265994dd99ff7e8
Don't use file notification on non-file buffers

Allow non-file buffers to declare that notification on their
default-directory is sufficient to know when auto-revert updates are
required by setting the new variable `buffer-auto-revert-by-notification'
to non-nil.  If nil, the default, then auto-revert will poll
those buffers instead. (bug#35418).
Currently, only Dired sets that variable.

* lisp/autorevert.el (auto-revert-buffers):
Modify condition for using notification.
* lisp/files.el (buffer-auto-revert-by-notification): New variable.
* lisp/dired.el (dired-mode): Set buffer-auto-revert-by-notification.
* doc/emacs/arevert-xtra.texi (Non-File Buffers): Document new variable.
* etc/NEWS (Changes in Specialized Modes and Packages): Describe new variable.
doc/emacs/arevert-xtra.texi
etc/NEWS
lisp/autorevert.el
lisp/dired.el
lisp/files.el