diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2016-02-28 10:54:45 +0100 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2016-02-28 10:54:45 +0100 |
commit | 5a44bfea9d4a6e6fbc8c74aa7e8691b47397927a (patch) | |
tree | 3b093609b1cfff5178f632d9c54ff96d0dcd5021 | |
parent | 0d60bfc431e1abe2f5b1c5e47acd0922f8708476 (diff) | |
download | emacs-5a44bfea9d4a6e6fbc8c74aa7e8691b47397927a.tar.gz |
Set auto-revert-use-notify to nil in global-auto-revert-mode. (Bug#22814)
* etc/NEWS:
* etc/PROBLEMS: Mention this.
* lisp/autorevert.el (global-auto-revert-mode): Set
`auto-revert-use-notify' to nil. (Bug#22814)
-rw-r--r-- | etc/NEWS | 10 | ||||
-rw-r--r-- | etc/PROBLEMS | 3 | ||||
-rw-r--r-- | lisp/autorevert.el | 6 |
3 files changed, 15 insertions, 4 deletions
@@ -1222,9 +1222,15 @@ make the new option `eshell-destroy-buffer-when-process-dies' non-nil. ** tar-mode: new `tar-new-entry' command, allowing for new members to be added to the archive. +** Autorevert + +--- +*** Dired buffers are also auto-reverted via file notifications, if +Emacs is compiled with file notification support. + --- -** Autorevert: dired buffers are also auto-reverted via file -notifications, if Emacs is compiled with file notification support. +*** `auto-revert-use-notify' is set to nil in `global-auto-revert-mode'. +See <http://debbugs.gnu.org/22814>. ** File Notifications diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 0491935b10c..d5313677113 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -601,6 +601,7 @@ can cause this error. Remove that file, execute 'ispell-kill-ispell' in Emacs, and then try spell-checking again. *** Emacs eats all file descriptors when using kqueue file notifications. +See <http://debbugs.gnu.org/22814>. When you have a large number of buffers running auto-revert-mode, and Emacs is configured to use the kqueue file notification library, it @@ -608,7 +609,7 @@ uses an own file descriptor for every watched file. On systems with a small limit of file descriptors allowed per process, like OS X, you could run out of file descriptors. You won't be able to open new files. -Set auto-revert-use-notify to nil in order to avoid this problem. +auto-revert-use-notify is set to nil in global-auto-revert-mode, therefore. * Runtime problems related to font handling diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 14e39bddd2e..bde8eb84a64 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -458,7 +458,11 @@ specifies in the mode line." :global t :group 'auto-revert :lighter global-auto-revert-mode-text (auto-revert-set-timer) (if global-auto-revert-mode - (auto-revert-buffers) + (progn + ;; We disable file notification because it could use too many + ;; ressources. See <http://debbugs.gnu.org/22814>. + (setq auto-revert-use-notify nil) + (auto-revert-buffers)) (dolist (buf (buffer-list)) (with-current-buffer buf (when auto-revert-use-notify |