From dbdc459a48091f5953faf14bcaaa7e6d37fbf024 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 6 Sep 2015 14:21:56 +0200 Subject: File notifications: Support renaming over directory boundaries * lisp/filenotify.el (file-notify-handle-event): (file-notify--pending-event): Adapt docstring. (file-notify--descriptor, file-notify-callback): Reimplement in order to support renaming over directory boundaries. (file-notify-add-watch): Adapt `file-notify--descriptor' call. * doc/lispref/os.texi (File Notifications): Remove limitation of file renaming to the same directory. --- doc/lispref/os.texi | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'doc/lispref/os.texi') diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 8d7177dc1d5..f7d4117673a 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2675,32 +2675,14 @@ being reported. For example: @end example Whether the action @code{renamed} is returned, depends on the used -watch library. It can be expected, when a directory is watched, and -both @var{file} and @var{file1} belong to this directory. Otherwise, -the actions @code{deleted} and @code{created} could be returned in a -random order. +watch library. Otherwise, the actions @code{deleted} and +@code{created} could be returned in a random order. @example @group (rename-file "/tmp/foo" "/tmp/bla") @result{} Event (35025468 renamed "/tmp/foo" "/tmp/bla") @end group - -@group -(file-notify-add-watch - "/var/tmp" '(change attribute-change) 'my-notify-callback) - @result{} 35025504 -@end group - -@group -(rename-file "/tmp/bla" "/var/tmp/bla") - @result{} ;; gfilenotify - Event (35025468 renamed "/tmp/bla" "/var/tmp/bla") - - @result{} ;; inotify - Event (35025504 created "/var/tmp/bla") - Event (35025468 deleted "/tmp/bla") -@end group @end example @end defun -- cgit v1.2.3