From: Michael Albinus Date: Wed, 22 May 2013 14:47:19 +0000 (+0200) Subject: * autorevert.el (auto-revert-notify-add-watch) X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~229^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5d0acd9d3bb26adfac1c80b78aa48dc8b2d34fe0;p=emacs.git * autorevert.el (auto-revert-notify-add-watch) (auto-revert-notify-handler): Add `attrib' for the inotify case, it indicates changes in file modification time. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0c1bcb7a8b..66d108ebbe0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-05-22 Michael Albinus + + * autorevert.el (auto-revert-notify-add-watch) + (auto-revert-notify-handler): Add `attrib' for the inotify case, + it indicates changes in file modification time. + 2013-05-22 Glenn Morris * emacs-lisp/bytecomp.el (byte-compile-file-form-autoload): diff --git a/lisp/autorevert.el b/lisp/autorevert.el index 02a99ce98e7..a2ce6017b21 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el @@ -521,8 +521,9 @@ will use an up-to-date value of `auto-revert-interval'" (not auto-revert-notify-watch-descriptor)) (let ((func (if (fboundp 'inotify-add-watch) 'inotify-add-watch 'w32notify-add-watch)) + ;; `attrib' is needed for file modification time. (aspect (if (fboundp 'inotify-add-watch) - '(create modify moved-to) '(size last-write-time))) + '(attrib create modify moved-to) '(size last-write-time))) (file (if (fboundp 'inotify-add-watch) (directory-file-name (expand-file-name default-directory)) (buffer-file-name)))) @@ -576,7 +577,8 @@ will use an up-to-date value of `auto-revert-interval'" ;; TODO: Filter events which stop watching, like `move' or `removed'. (cl-assert descriptor) (when (featurep 'inotify) - (cl-assert (or (memq 'create action) + (cl-assert (or (memq 'attrib action) + (memq 'create action) (memq 'modify action) (memq 'moved-to action)))) (when (featurep 'w32notify) (cl-assert (eq 'modified action)))