diff options
| author | Michael Albinus | 2015-11-16 14:43:14 +0100 |
|---|---|---|
| committer | Michael Albinus | 2015-11-25 15:07:11 +0100 |
| commit | 99aa85535aebd96eff294250caef9ab2de2334b7 (patch) | |
| tree | b0f9dabf4eec69355e3b1aeecc7ac90a5763ba3a | |
| parent | 8deebe1ab8d79c3a3fbc3043f99af76802f60bd6 (diff) | |
| download | emacs-99aa85535aebd96eff294250caef9ab2de2334b7.tar.gz emacs-99aa85535aebd96eff294250caef9ab2de2334b7.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.texi | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index f3c4e29cca2..17a0b47ad06 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -2640,9 +2640,9 @@ This function removes the tray notification given by its unique | |||
| 2640 | 2640 | ||
| 2641 | Several operating systems support watching of filesystems for changes | 2641 | Several operating systems support watching of filesystems for changes |
| 2642 | of files. If configured properly, Emacs links a respective library | 2642 | of files. If configured properly, Emacs links a respective library |
| 2643 | like @file{gfilenotify}, @file{inotify}, or @file{w32notify} | 2643 | like @file{inotify}, @file{kqueue}, @file{gfilenotify}, or |
| 2644 | statically. These libraries enable watching of filesystems on the | 2644 | @file{w32notify} statically. These libraries enable watching of |
| 2645 | local machine. | 2645 | filesystems on the local machine. |
| 2646 | 2646 | ||
| 2647 | It is also possible to watch filesystems on remote machines, | 2647 | It is also possible to watch filesystems on remote machines, |
| 2648 | @pxref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual} | 2648 | @pxref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual} |
| @@ -2713,7 +2713,8 @@ watching @var{file} has been stopped | |||
| 2713 | Note that the @file{w32notify} library does not report | 2713 | Note that the @file{w32notify} library does not report |
| 2714 | @code{attribute-changed} events. When some file's attribute, like | 2714 | @code{attribute-changed} events. When some file's attribute, like |
| 2715 | permissions or modification time, has changed, this library reports a | 2715 | permissions or modification time, has changed, this library reports a |
| 2716 | @code{changed} event. | 2716 | @code{changed} event. Likewise, the @file{kqueue} library does not |
| 2717 | report reliably file attribute changes when watching a directory. | ||
| 2717 | 2718 | ||
| 2718 | The @code{stopped} event reports, that watching the file has been | 2719 | The @code{stopped} event reports, that watching the file has been |
| 2719 | stopped. This could be because @code{file-notify-rm-watch} was called | 2720 | stopped. This could be because @code{file-notify-rm-watch} was called |
| @@ -2752,7 +2753,7 @@ being reported. For example: | |||
| 2752 | @group | 2753 | @group |
| 2753 | (write-region "bla" nil "/tmp/foo") | 2754 | (write-region "bla" nil "/tmp/foo") |
| 2754 | @result{} Event (35025468 created "/tmp/.#foo") | 2755 | @result{} Event (35025468 created "/tmp/.#foo") |
| 2755 | Event (35025468 changed "/tmp/foo") [2 times] | 2756 | Event (35025468 changed "/tmp/foo") |
| 2756 | Event (35025468 deleted "/tmp/.#foo") | 2757 | Event (35025468 deleted "/tmp/.#foo") |
| 2757 | @end group | 2758 | @end group |
| 2758 | 2759 | ||
| @@ -2798,14 +2799,14 @@ also makes it invalid. | |||
| 2798 | @example | 2799 | @example |
| 2799 | @group | 2800 | @group |
| 2800 | (make-directory "/tmp/foo") | 2801 | (make-directory "/tmp/foo") |
| 2801 | @result{} nil | 2802 | @result{} Event (35025468 created "/tmp/foo") |
| 2802 | @end group | 2803 | @end group |
| 2803 | 2804 | ||
| 2804 | @group | 2805 | @group |
| 2805 | (setq desc | 2806 | (setq desc |
| 2806 | (file-notify-add-watch | 2807 | (file-notify-add-watch |
| 2807 | "/tmp/foo" '(change) 'my-notify-callback)) | 2808 | "/tmp/foo" '(change) 'my-notify-callback)) |
| 2808 | @result{} 35025468 | 2809 | @result{} 11359632 |
| 2809 | @end group | 2810 | @end group |
| 2810 | 2811 | ||
| 2811 | @group | 2812 | @group |
| @@ -2815,32 +2816,34 @@ also makes it invalid. | |||
| 2815 | 2816 | ||
| 2816 | @group | 2817 | @group |
| 2817 | (write-region "bla" nil "/tmp/foo/bla") | 2818 | (write-region "bla" nil "/tmp/foo/bla") |
| 2818 | @result{} Event (35025468 created "/tmp/foo/.#bla") | 2819 | @result{} Event (11359632 created "/tmp/foo/.#bla") |
| 2819 | Event (35025468 created "/tmp/foo/bla") | 2820 | Event (11359632 created "/tmp/foo/bla") |
| 2820 | Event (35025468 changed "/tmp/foo/bla") | 2821 | Event (11359632 changed "/tmp/foo/bla") |
| 2821 | Event (35025468 changed "/tmp/foo/.#bla") | 2822 | Event (11359632 deleted "/tmp/foo/.#bla") |
| 2822 | @end group | 2823 | @end group |
| 2823 | 2824 | ||
| 2824 | @group | 2825 | @group |
| 2825 | ;; Deleting a file in the directory doesn't invalidate the watch. | 2826 | ;; Deleting a file in the directory doesn't invalidate the watch. |
| 2826 | (delete-file "/tmp/foo/bla") | 2827 | (delete-file "/tmp/foo/bla") |
| 2827 | @result{} Event (35025468 deleted "/tmp/foo/bla") | 2828 | @result{} Event (11359632 deleted "/tmp/foo/bla") |
| 2828 | @end group | 2829 | @end group |
| 2829 | 2830 | ||
| 2830 | @group | 2831 | @group |
| 2831 | (write-region "bla" nil "/tmp/foo/bla") | 2832 | (write-region "bla" nil "/tmp/foo/bla") |
| 2832 | @result{} Event (35025468 created "/tmp/foo/.#bla") | 2833 | @result{} Event (11359632 created "/tmp/foo/.#bla") |
| 2833 | Event (35025468 created "/tmp/foo/bla") | 2834 | Event (11359632 created "/tmp/foo/bla") |
| 2834 | Event (35025468 changed "/tmp/foo/bla") | 2835 | Event (11359632 changed "/tmp/foo/bla") |
| 2835 | Event (35025468 changed "/tmp/foo/.#bla") | 2836 | Event (11359632 deleted "/tmp/foo/.#bla") |
| 2836 | @end group | 2837 | @end group |
| 2837 | 2838 | ||
| 2838 | @group | 2839 | @group |
| 2839 | ;; Deleting the directory invalidates the watch. | 2840 | ;; Deleting the directory invalidates the watch. |
| 2841 | ;; Events arrive for different watch descriptors. | ||
| 2840 | (delete-directory "/tmp/foo" 'recursive) | 2842 | (delete-directory "/tmp/foo" 'recursive) |
| 2841 | @result{} Event (35025468 deleted "/tmp/foo/bla") | 2843 | @result{} Event (35025468 deleted "/tmp/foo") |
| 2842 | Event (35025468 deleted "/tmp/foo") | 2844 | Event (11359632 deleted "/tmp/foo/bla") |
| 2843 | Event (35025468 stopped "/tmp/foo") | 2845 | Event (11359632 deleted "/tmp/foo") |
| 2846 | Event (11359632 stopped "/tmp/foo") | ||
| 2844 | @end group | 2847 | @end group |
| 2845 | 2848 | ||
| 2846 | @group | 2849 | @group |