summaryrefslogtreecommitdiff
path: root/lisp/filenotify.el
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2019-01-06 15:42:57 +0100
committerMichael Albinus <michael.albinus@gmx.de>2019-01-06 15:42:57 +0100
commitcfa54ab7d8a64a8a186e29ed2db2cbd58b99c0d9 (patch)
tree226f266192dd82b764fa6d693df23b10cd95ddfb /lisp/filenotify.el
parenta3d52b3057c98bce581bc94912ef3ced6fad6f14 (diff)
downloademacs-cfa54ab7d8a64a8a186e29ed2db2cbd58b99c0d9.tar.gz
Adapt filenotify-tests for emba
* test/lisp/filenotify-tests.el (file-notify-test03-events) (file-notify-test05-file-validity) (file-notify-test06-dir-validity) (file-notify-test07-many-events) (file-notify-test09-watched-file-in-watched-dir): Adapt tests for emba.
Diffstat (limited to 'lisp/filenotify.el')
-rw-r--r--lisp/filenotify.el14
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