diff options
Diffstat (limited to 'doc')
| -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 7206cd4ef86..8e3720eb947 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -2653,9 +2653,9 @@ This function removes the tray notification given by its unique | |||
| 2653 | 2653 | ||
| 2654 | Several operating systems support watching of filesystems for changes | 2654 | Several operating systems support watching of filesystems for changes |
| 2655 | of files. If configured properly, Emacs links a respective library | 2655 | of files. If configured properly, Emacs links a respective library |
| 2656 | like @file{gfilenotify}, @file{inotify}, or @file{w32notify} | 2656 | like @file{inotify}, @file{kqueue}, @file{gfilenotify}, or |
| 2657 | statically. These libraries enable watching of filesystems on the | 2657 | @file{w32notify} statically. These libraries enable watching of |
| 2658 | local machine. | 2658 | filesystems on the local machine. |
| 2659 | 2659 | ||
| 2660 | It is also possible to watch filesystems on remote machines, | 2660 | It is also possible to watch filesystems on remote machines, |
| 2661 | @pxref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual} | 2661 | @pxref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual} |
| @@ -2726,7 +2726,8 @@ watching @var{file} has been stopped | |||
| 2726 | Note that the @file{w32notify} library does not report | 2726 | Note that the @file{w32notify} library does not report |
| 2727 | @code{attribute-changed} events. When some file's attribute, like | 2727 | @code{attribute-changed} events. When some file's attribute, like |
| 2728 | permissions or modification time, has changed, this library reports a | 2728 | permissions or modification time, has changed, this library reports a |
| 2729 | @code{changed} event. | 2729 | @code{changed} event. Likewise, the @file{kqueue} library does not |
| 2730 | report reliably file attribute changes when watching a directory. | ||
| 2730 | 2731 | ||
| 2731 | The @code{stopped} event reports, that watching the file has been | 2732 | The @code{stopped} event reports, that watching the file has been |
| 2732 | stopped. This could be because @code{file-notify-rm-watch} was called | 2733 | stopped. This could be because @code{file-notify-rm-watch} was called |
| @@ -2765,7 +2766,7 @@ being reported. For example: | |||
| 2765 | @group | 2766 | @group |
| 2766 | (write-region "bla" nil "/tmp/foo") | 2767 | (write-region "bla" nil "/tmp/foo") |
| 2767 | @result{} Event (35025468 created "/tmp/.#foo") | 2768 | @result{} Event (35025468 created "/tmp/.#foo") |
| 2768 | Event (35025468 changed "/tmp/foo") [2 times] | 2769 | Event (35025468 changed "/tmp/foo") |
| 2769 | Event (35025468 deleted "/tmp/.#foo") | 2770 | Event (35025468 deleted "/tmp/.#foo") |
| 2770 | @end group | 2771 | @end group |
| 2771 | 2772 | ||
| @@ -2811,14 +2812,14 @@ also makes it invalid. | |||
| 2811 | @example | 2812 | @example |
| 2812 | @group | 2813 | @group |
| 2813 | (make-directory "/tmp/foo") | 2814 | (make-directory "/tmp/foo") |
| 2814 | @result{} nil | 2815 | @result{} Event (35025468 created "/tmp/foo") |
| 2815 | @end group | 2816 | @end group |
| 2816 | 2817 | ||
| 2817 | @group | 2818 | @group |
| 2818 | (setq desc | 2819 | (setq desc |
| 2819 | (file-notify-add-watch | 2820 | (file-notify-add-watch |
| 2820 | "/tmp/foo" '(change) 'my-notify-callback)) | 2821 | "/tmp/foo" '(change) 'my-notify-callback)) |
| 2821 | @result{} 35025468 | 2822 | @result{} 11359632 |
| 2822 | @end group | 2823 | @end group |
| 2823 | 2824 | ||
| 2824 | @group | 2825 | @group |
| @@ -2828,32 +2829,34 @@ also makes it invalid. | |||
| 2828 | 2829 | ||
| 2829 | @group | 2830 | @group |
| 2830 | (write-region "bla" nil "/tmp/foo/bla") | 2831 | (write-region "bla" nil "/tmp/foo/bla") |
| 2831 | @result{} Event (35025468 created "/tmp/foo/.#bla") | 2832 | @result{} Event (11359632 created "/tmp/foo/.#bla") |
| 2832 | Event (35025468 created "/tmp/foo/bla") | 2833 | Event (11359632 created "/tmp/foo/bla") |
| 2833 | Event (35025468 changed "/tmp/foo/bla") | 2834 | Event (11359632 changed "/tmp/foo/bla") |
| 2834 | Event (35025468 changed "/tmp/foo/.#bla") | 2835 | Event (11359632 deleted "/tmp/foo/.#bla") |
| 2835 | @end group | 2836 | @end group |
| 2836 | 2837 | ||
| 2837 | @group | 2838 | @group |
| 2838 | ;; Deleting a file in the directory doesn't invalidate the watch. | 2839 | ;; Deleting a file in the directory doesn't invalidate the watch. |
| 2839 | (delete-file "/tmp/foo/bla") | 2840 | (delete-file "/tmp/foo/bla") |
| 2840 | @result{} Event (35025468 deleted "/tmp/foo/bla") | 2841 | @result{} Event (11359632 deleted "/tmp/foo/bla") |
| 2841 | @end group | 2842 | @end group |
| 2842 | 2843 | ||
| 2843 | @group | 2844 | @group |
| 2844 | (write-region "bla" nil "/tmp/foo/bla") | 2845 | (write-region "bla" nil "/tmp/foo/bla") |
| 2845 | @result{} Event (35025468 created "/tmp/foo/.#bla") | 2846 | @result{} Event (11359632 created "/tmp/foo/.#bla") |
| 2846 | Event (35025468 created "/tmp/foo/bla") | 2847 | Event (11359632 created "/tmp/foo/bla") |
| 2847 | Event (35025468 changed "/tmp/foo/bla") | 2848 | Event (11359632 changed "/tmp/foo/bla") |
| 2848 | Event (35025468 changed "/tmp/foo/.#bla") | 2849 | Event (11359632 deleted "/tmp/foo/.#bla") |
| 2849 | @end group | 2850 | @end group |
| 2850 | 2851 | ||
| 2851 | @group | 2852 | @group |
| 2852 | ;; Deleting the directory invalidates the watch. | 2853 | ;; Deleting the directory invalidates the watch. |
| 2854 | ;; Events arrive for different watch descriptors. | ||
| 2853 | (delete-directory "/tmp/foo" 'recursive) | 2855 | (delete-directory "/tmp/foo" 'recursive) |
| 2854 | @result{} Event (35025468 deleted "/tmp/foo/bla") | 2856 | @result{} Event (35025468 deleted "/tmp/foo") |
| 2855 | Event (35025468 deleted "/tmp/foo") | 2857 | Event (11359632 deleted "/tmp/foo/bla") |
| 2856 | Event (35025468 stopped "/tmp/foo") | 2858 | Event (11359632 deleted "/tmp/foo") |
| 2859 | Event (11359632 stopped "/tmp/foo") | ||
| 2857 | @end group | 2860 | @end group |
| 2858 | 2861 | ||
| 2859 | @group | 2862 | @group |