diff options
| author | Eli Zaretskii | 2013-02-16 11:13:40 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-02-16 11:13:40 +0200 |
| commit | a7a84eea2d2f38e0029e656faa6566ae11de03a3 (patch) | |
| tree | 0b429f08b4eccab2a78dc97b2132a6a813ea0106 | |
| parent | 99e619b61769c2cd226777a1352e27463d75bc07 (diff) | |
| download | emacs-a7a84eea2d2f38e0029e656faa6566ae11de03a3.tar.gz emacs-a7a84eea2d2f38e0029e656faa6566ae11de03a3.zip | |
Fix bug #13725 with file notifications on MS-Windows.
lisp/autorevert.el (auto-revert-notify-add-watch): With 'w32notify',
add watch for the file, not its parent directory, since w32notify
sets up the watch for the directory internally.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/autorevert.el | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 072521f1b44..19d9404c8c4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2013-02-16 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * autorevert.el (auto-revert-notify-add-watch): With 'w32notify', | ||
| 4 | add watch for the file, not its parent directory, since w32notify | ||
| 5 | sets up the watch for the directory internally. (Bug#13725) | ||
| 6 | |||
| 1 | 2013-02-16 Glenn Morris <rgm@gnu.org> | 7 | 2013-02-16 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * image.el (image-default-frame-delay): New variable. | 9 | * image.el (image-default-frame-delay): New variable. |
diff --git a/lisp/autorevert.el b/lisp/autorevert.el index fe6cf216363..a2d70c37762 100644 --- a/lisp/autorevert.el +++ b/lisp/autorevert.el | |||
| @@ -519,12 +519,13 @@ will use an up-to-date value of `auto-revert-interval'" | |||
| 519 | (let ((func (if (fboundp 'inotify-add-watch) | 519 | (let ((func (if (fboundp 'inotify-add-watch) |
| 520 | 'inotify-add-watch 'w32notify-add-watch)) | 520 | 'inotify-add-watch 'w32notify-add-watch)) |
| 521 | (aspect (if (fboundp 'inotify-add-watch) | 521 | (aspect (if (fboundp 'inotify-add-watch) |
| 522 | '(create modify moved-to) '(size last-write-time)))) | 522 | '(create modify moved-to) '(size last-write-time))) |
| 523 | (file (if (fboundp 'inotify-add-watch) | ||
| 524 | (directory-file-name (expand-file-name default-directory)) | ||
| 525 | (buffer-file-name)))) | ||
| 523 | (setq auto-revert-notify-watch-descriptor | 526 | (setq auto-revert-notify-watch-descriptor |
| 524 | (ignore-errors | 527 | (ignore-errors |
| 525 | (funcall | 528 | (funcall func file aspect 'auto-revert-notify-handler))) |
| 526 | func (directory-file-name (expand-file-name default-directory)) | ||
| 527 | aspect 'auto-revert-notify-handler))) | ||
| 528 | (if auto-revert-notify-watch-descriptor | 529 | (if auto-revert-notify-watch-descriptor |
| 529 | (progn | 530 | (progn |
| 530 | (puthash | 531 | (puthash |