aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2015-11-16 14:43:14 +0100
committerMichael Albinus2015-11-16 14:43:14 +0100
commitb5804c3a08cca4082bb2bcff1ab70c94ba0c7b96 (patch)
tree27bb62c5b7a486e84a9f5b2624d2468620287c0f
parent30bd630da3ffe0e7a46566fed3ddf4e61abcb737 (diff)
downloademacs-b5804c3a08cca4082bb2bcff1ab70c94ba0c7b96.tar.gz
emacs-b5804c3a08cca4082bb2bcff1ab70c94ba0c7b96.zip
Doc changes for kqueue
* doc/lispref/os.texi (File Notifications): Add kqueue as backend. Fix some glitches in the example.
-rw-r--r--doc/lispref/os.texi41
1 files changed, 22 insertions, 19 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 7050df86a18..666a05dac9b 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -2566,9 +2566,9 @@ specification prior to @samp{"1.0"}.
2566 2566
2567Several operating systems support watching of filesystems for changes 2567Several operating systems support watching of filesystems for changes
2568of files. If configured properly, Emacs links a respective library 2568of files. If configured properly, Emacs links a respective library
2569like @file{gfilenotify}, @file{inotify}, or @file{w32notify} 2569like @file{inotify}, @file{kqueue}, @file{gfilenotify}, or
2570statically. These libraries enable watching of filesystems on the 2570@file{w32notify} statically. These libraries enable watching of
2571local machine. 2571filesystems on the local machine.
2572 2572
2573It is also possible to watch filesystems on remote machines, 2573It is also possible to watch filesystems on remote machines,
2574@pxref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual} 2574@pxref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual}
@@ -2639,7 +2639,8 @@ watching @var{file} has been stopped
2639Note that the @file{w32notify} library does not report 2639Note that the @file{w32notify} library does not report
2640@code{attribute-changed} events. When some file's attribute, like 2640@code{attribute-changed} events. When some file's attribute, like
2641permissions or modification time, has changed, this library reports a 2641permissions or modification time, has changed, this library reports a
2642@code{changed} event. 2642@code{changed} event. Likewise, the @file{kqueue} library does not
2643report reliably file attribute changes when watching a directory.
2643 2644
2644The @code{stopped} event reports, that watching the file has been 2645The @code{stopped} event reports, that watching the file has been
2645stopped. This could be because @code{file-notify-rm-watch} was called 2646stopped. This could be because @code{file-notify-rm-watch} was called
@@ -2678,7 +2679,7 @@ being reported. For example:
2678@group 2679@group
2679(write-region "bla" nil "/tmp/foo") 2680(write-region "bla" nil "/tmp/foo")
2680 @result{} Event (35025468 created "/tmp/.#foo") 2681 @result{} Event (35025468 created "/tmp/.#foo")
2681 Event (35025468 changed "/tmp/foo") [2 times] 2682 Event (35025468 changed "/tmp/foo")
2682 Event (35025468 deleted "/tmp/.#foo") 2683 Event (35025468 deleted "/tmp/.#foo")
2683@end group 2684@end group
2684 2685
@@ -2724,14 +2725,14 @@ also makes it invalid.
2724@example 2725@example
2725@group 2726@group
2726(make-directory "/tmp/foo") 2727(make-directory "/tmp/foo")
2727 @result{} nil 2728 @result{} Event (35025468 created "/tmp/foo")
2728@end group 2729@end group
2729 2730
2730@group 2731@group
2731(setq desc 2732(setq desc
2732 (file-notify-add-watch 2733 (file-notify-add-watch
2733 "/tmp/foo" '(change) 'my-notify-callback)) 2734 "/tmp/foo" '(change) 'my-notify-callback))
2734 @result{} 35025468 2735 @result{} 11359632
2735@end group 2736@end group
2736 2737
2737@group 2738@group
@@ -2741,32 +2742,34 @@ also makes it invalid.
2741 2742
2742@group 2743@group
2743(write-region "bla" nil "/tmp/foo/bla") 2744(write-region "bla" nil "/tmp/foo/bla")
2744 @result{} Event (35025468 created "/tmp/foo/.#bla") 2745 @result{} Event (11359632 created "/tmp/foo/.#bla")
2745 Event (35025468 created "/tmp/foo/bla") 2746 Event (11359632 created "/tmp/foo/bla")
2746 Event (35025468 changed "/tmp/foo/bla") 2747 Event (11359632 changed "/tmp/foo/bla")
2747 Event (35025468 changed "/tmp/foo/.#bla") 2748 Event (11359632 deleted "/tmp/foo/.#bla")
2748@end group 2749@end group
2749 2750
2750@group 2751@group
2751;; Deleting a file in the directory doesn't invalidate the watch. 2752;; Deleting a file in the directory doesn't invalidate the watch.
2752(delete-file "/tmp/foo/bla") 2753(delete-file "/tmp/foo/bla")
2753 @result{} Event (35025468 deleted "/tmp/foo/bla") 2754 @result{} Event (11359632 deleted "/tmp/foo/bla")
2754@end group 2755@end group
2755 2756
2756@group 2757@group
2757(write-region "bla" nil "/tmp/foo/bla") 2758(write-region "bla" nil "/tmp/foo/bla")
2758 @result{} Event (35025468 created "/tmp/foo/.#bla") 2759 @result{} Event (11359632 created "/tmp/foo/.#bla")
2759 Event (35025468 created "/tmp/foo/bla") 2760 Event (11359632 created "/tmp/foo/bla")
2760 Event (35025468 changed "/tmp/foo/bla") 2761 Event (11359632 changed "/tmp/foo/bla")
2761 Event (35025468 changed "/tmp/foo/.#bla") 2762 Event (11359632 deleted "/tmp/foo/.#bla")
2762@end group 2763@end group
2763 2764
2764@group 2765@group
2765;; Deleting the directory invalidates the watch. 2766;; Deleting the directory invalidates the watch.
2767;; Events arrive for different watch descriptors.
2766(delete-directory "/tmp/foo" 'recursive) 2768(delete-directory "/tmp/foo" 'recursive)
2767 @result{} Event (35025468 deleted "/tmp/foo/bla") 2769 @result{} Event (35025468 deleted "/tmp/foo")
2768 Event (35025468 deleted "/tmp/foo") 2770 Event (11359632 deleted "/tmp/foo/bla")
2769 Event (35025468 stopped "/tmp/foo") 2771 Event (11359632 deleted "/tmp/foo")
2772 Event (11359632 stopped "/tmp/foo")
2770@end group 2773@end group
2771 2774
2772@group 2775@group