callback)
(defun file-notify--watch-absolute-filename (watch)
+ "Return the absolute filename observed by WATCH."
(if (file-notify--watch-filename watch)
(expand-file-name
(file-notify--watch-filename watch)
(car file-notify--pending-event)))
;; If the source is handled by another watch, we
;; must fire the rename event there as well.
- (when (not (equal desc (caar file-notify--pending-event)))
+ (unless (equal desc (caar file-notify--pending-event))
(setq pending-event
`((,(caar file-notify--pending-event)
renamed ,file ,file1)
;; Apply pending callback.
(when pending-event
- (setcar
- (car pending-event)
- (caar pending-event))
(funcall (cadr pending-event) (car pending-event))
(setq pending-event nil))
COOKIE is an object that can be compared using `equal' to identify two matching
renames (moved-from and moved-to).
-See inotify(7) and inotify_add_watch(2) for further information. The inotify fd
-is managed internally and there is no corresponding inotify_init. Use
-`inotify-rm-watch' to remove a watch. */)
+See inotify(7) and inotify_add_watch(2) for further information. The
+inotify fd is managed internally and there is no corresponding
+inotify_init. Use `inotify-rm-watch' to remove a watch.
+
+Also note, that the following inotify bit-masks can not be used, due
+to the fact that descriptors are shared across different callers.
+
+IN_EXCL_UNLINK
+IN_MASK_ADD
+IN_ONESHOT
+IN_ONLYDIR */)
(Lisp_Object filename, Lisp_Object aspect, Lisp_Object callback)
{
Lisp_Object encoded_file_name;