diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/filenotify.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/filenotify.el b/lisp/filenotify.el index f66c8ed429a..3f9bb960a9b 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -114,7 +114,7 @@ Could be different from the directory watched by the backend library." (when-let* ((watch (gethash (car event) file-notify-descriptors))) (directory-file-name (expand-file-name - (or (and (stringp (nth 2 event)) (nth 2 event)) "") + (or (and (stringp (nth 2 event)) (nth 2 event)) "") (file-notify--watch-directory watch))))) ;; Only `gfilenotify' could return two file names. @@ -240,8 +240,10 @@ EVENT is the cadr of the event in `file-notify-handle-event' (file-notify--watch-filename watch) (file-name-nondirectory file1))))) ;;(message - ;;"file-notify-callback %S %S %S %S %S" - ;;desc action file file1 watch) + ;;"file-notify-callback %S %S %S %S %S %S %S" + ;;desc action file file1 watch + ;;(file-notify--event-watched-file event) + ;;(file-notify--watch-directory watch)) (funcall (file-notify--watch-callback watch) (if file1 `(,desc ,action ,file ,file1) @@ -419,11 +421,9 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'." descriptor)) t)))) - ;; TODO: -;; * Watching a /dir/file may receive events for dir. -;; (This may be the desired behavior.) -;; * Watching a file in an already watched directory + +;; * Watching a file in an already watched directory. ;; If the file is created and *then* a watch is added to that file, the ;; watch might receive events which occurred prior to it being created, ;; due to the way events are propagated during idle time. Note: This |