• Michael Albinus's avatar
    Improve file notifications, especially for Tramp · f5bdcb32
    Michael Albinus authored
    * 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'.
    f5bdcb32
tramp-gvfs.el 68.5 KB