aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Albinus2015-09-06 14:21:56 +0200
committerMichael Albinus2015-09-06 14:21:56 +0200
commitdbdc459a48091f5953faf14bcaaa7e6d37fbf024 (patch)
tree5ea667562039d35f4e6def4aec933ca0149c3988 /doc
parent29b0e0bb2c4e09465b97497ba96886e90a64ad71 (diff)
downloademacs-dbdc459a48091f5953faf14bcaaa7e6d37fbf024.tar.gz
emacs-dbdc459a48091f5953faf14bcaaa7e6d37fbf024.zip
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/lispref/os.texi22
1 files changed, 2 insertions, 20 deletions
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:
2675@end example 2675@end example
2676 2676
2677Whether the action @code{renamed} is returned, depends on the used 2677Whether the action @code{renamed} is returned, depends on the used
2678watch library. It can be expected, when a directory is watched, and 2678watch library. Otherwise, the actions @code{deleted} and
2679both @var{file} and @var{file1} belong to this directory. Otherwise, 2679@code{created} could be returned in a random order.
2680the actions @code{deleted} and @code{created} could be returned in a
2681random order.
2682 2680
2683@example 2681@example
2684@group 2682@group
2685(rename-file "/tmp/foo" "/tmp/bla") 2683(rename-file "/tmp/foo" "/tmp/bla")
2686 @result{} Event (35025468 renamed "/tmp/foo" "/tmp/bla") 2684 @result{} Event (35025468 renamed "/tmp/foo" "/tmp/bla")
2687@end group 2685@end group
2688
2689@group
2690(file-notify-add-watch
2691 "/var/tmp" '(change attribute-change) 'my-notify-callback)
2692 @result{} 35025504
2693@end group
2694
2695@group
2696(rename-file "/tmp/bla" "/var/tmp/bla")
2697 @result{} ;; gfilenotify
2698 Event (35025468 renamed "/tmp/bla" "/var/tmp/bla")
2699
2700 @result{} ;; inotify
2701 Event (35025504 created "/var/tmp/bla")
2702 Event (35025468 deleted "/tmp/bla")
2703@end group
2704@end example 2686@end example
2705@end defun 2687@end defun
2706 2688