]> code.delx.au - gnu-emacs/commit
Improve file notifications, especially for Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Sun, 20 Sep 2015 16:44:36 +0000 (18:44 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Sun, 20 Sep 2015 16:44:36 +0000 (18:44 +0200)
commitf5bdcb3221ba28326b47210773d84c49cc9b4a1e
treef316feaf1d548b157ef1a3cfcbb831864e50c003
parentab11a1cf27ebe3791df45cccde3c851affd184dd
Improve file notifications, especially for Tramp

* doc/lispref/files.texi (Magic File Names):
Mention `file-notify-valid-p'.

* doc/lispref/os.texi (File Notifications):
Describe `file-notify-valid-p'.

* etc/NEWS: Add `file-notify-valid-p'.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch):
Improve implementation.
(tramp-gvfs-monitor-file-process-filter): Rename from
`tramp-gvfs-file-gvfs-monitor-file-process-filter'.  Delete
process if appropriate.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-notify-add-watch):
Improve implementation.
(tramp-sh-gvfs-monitor-dir-process-filter): Rename from
`tramp-sh-file-gvfs-monitor-dir-process-filter'.  Delete process
if appropriate.
(tramp-sh-inotifywait-process-filter): Rename from
`tramp-sh-file-inotifywait-process-filter'.  Delete process if
appropriate.

* lisp/net/tramp.el (tramp-handle-file-notify-rm-watch):
Use `delete-process'
(tramp-handle-file-notify-valid-p): Check also, that file or
directory to be watched still exists.

* test/automated/file-notify-tests.el (file-notify--test-timeout):
New defun.  Use it at all places a timeout is needed.
(file-notify--test-cleanup): Delete directories recursively.
Cleanup also Tramp connections.
(file-notify-test02-events): Add tests for `attribute-change'.
(file-notify-test04-file-validity, file-notify-test05-dir-validity):
Add tests for `file-notify-rm-watch'.
doc/lispref/files.texi
doc/lispref/os.texi
etc/NEWS
lisp/net/tramp-gvfs.el
lisp/net/tramp-sh.el
lisp/net/tramp.el
test/automated/file-notify-tests.el