diff options
| -rw-r--r-- | doc/emacs/ChangeLog | 4 | ||||
| -rw-r--r-- | doc/emacs/arevert-xtra.texi | 59 |
2 files changed, 34 insertions, 29 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index d44b255eedf..b355801777a 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-06-28 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * arevert-xtra.texi: Minor language tweaks. | ||
| 4 | |||
| 1 | 2009-06-23 Miles Bader <miles@gnu.org> | 5 | 2009-06-23 Miles Bader <miles@gnu.org> |
| 2 | 6 | ||
| 3 | * display.texi (Scrolling): Document `recenter-redisplay' | 7 | * display.texi (Scrolling): Document `recenter-redisplay' |
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi index b3457e8dab7..f2151186555 100644 --- a/doc/emacs/arevert-xtra.texi +++ b/doc/emacs/arevert-xtra.texi | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | @c This is part of the Emacs manual. | 1 | @c This is part of the Emacs manual. |
| 2 | @c Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 2 | @c Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 |
| 3 | @c Free Software Foundation, Inc. | ||
| 3 | @c See file emacs.texi for copying conditions. | 4 | @c See file emacs.texi for copying conditions. |
| 4 | @c | 5 | @c |
| 5 | @c This file is included either in emacs-xtra.texi (when producing the | 6 | @c This file is included either in emacs-xtra.texi (when producing the |
| @@ -7,13 +8,12 @@ | |||
| 7 | @node Autorevert | 8 | @node Autorevert |
| 8 | @section Auto Reverting non-file Buffers | 9 | @section Auto Reverting non-file Buffers |
| 9 | 10 | ||
| 10 | Normally Global Auto Revert Mode only reverts file buffers. There are | 11 | Global Auto Revert Mode normally only reverts file buffers. There are |
| 11 | two ways to auto-revert certain non-file buffers: enabling Auto Revert | 12 | two ways to auto-revert certain non-file buffers: enabling Auto Revert |
| 12 | Mode in those buffers (using @kbd{M-x auto-revert-mode}) and setting | 13 | Mode in those buffers (using @kbd{M-x auto-revert-mode}); and setting |
| 13 | @code{global-auto-revert-non-file-buffers} to @code{t}. The latter | 14 | @code{global-auto-revert-non-file-buffers} non-@code{nil}. The latter |
| 14 | enables Auto Reverting for all types of buffers for which it is | 15 | enables Auto Reverting for all types of buffers for which it is |
| 15 | implemented, that is, for the types of buffers listed in the menu | 16 | implemented (listed in the menu below). |
| 16 | below. | ||
| 17 | 17 | ||
| 18 | Like file buffers, non-file buffers should normally not revert while | 18 | Like file buffers, non-file buffers should normally not revert while |
| 19 | you are working on them, or while they contain information that might | 19 | you are working on them, or while they contain information that might |
| @@ -26,10 +26,10 @@ Another tricky detail is that, for efficiency reasons, Auto Revert | |||
| 26 | often does not try to detect all possible changes in the buffer, only | 26 | often does not try to detect all possible changes in the buffer, only |
| 27 | changes that are ``major'' or easy to detect. Hence, enabling | 27 | changes that are ``major'' or easy to detect. Hence, enabling |
| 28 | auto-reverting for a non-file buffer does not always guarantee that | 28 | auto-reverting for a non-file buffer does not always guarantee that |
| 29 | all information in the buffer is up to date and does not necessarily | 29 | all information in the buffer is up-to-date, and does not necessarily |
| 30 | make manual reverts useless. | 30 | make manual reverts useless. |
| 31 | 31 | ||
| 32 | At the other extreme, certain buffers automatically auto-revert every | 32 | At the other extreme, certain buffers automatically revert every |
| 33 | @code{auto-revert-interval} seconds. (This currently only applies to | 33 | @code{auto-revert-interval} seconds. (This currently only applies to |
| 34 | the Buffer Menu.) In this case, Auto Revert does not print any | 34 | the Buffer Menu.) In this case, Auto Revert does not print any |
| 35 | messages while reverting, even when @code{auto-revert-verbose} is | 35 | messages while reverting, even when @code{auto-revert-verbose} is |
| @@ -67,14 +67,15 @@ operating systems. It may not work satisfactorily on some other | |||
| 67 | systems. | 67 | systems. |
| 68 | 68 | ||
| 69 | Dired buffers only auto-revert when the file list of the buffer's main | 69 | Dired buffers only auto-revert when the file list of the buffer's main |
| 70 | directory changes. They do not auto-revert when information about a | 70 | directory changes (e.g. when a new file is added). They do not |
| 71 | particular file changes or when inserted subdirectories change. To be | 71 | auto-revert when information about a particular file changes |
| 72 | sure that @emph{all} listed information is up to date, you have to | 72 | (e.g. when the size changes) or when inserted subdirectories change. |
| 73 | manually revert using @kbd{g}, @emph{even} if auto-reverting is | 73 | To be sure that @emph{all} listed information is up to date, you have |
| 74 | to manually revert using @kbd{g}, @emph{even} if auto-reverting is | ||
| 74 | enabled in the Dired buffer. Sometimes, you might get the impression | 75 | enabled in the Dired buffer. Sometimes, you might get the impression |
| 75 | that modifying or saving files listed in the main directory actually | 76 | that modifying or saving files listed in the main directory actually |
| 76 | does cause auto-reverting. This is because making changes to a file, | 77 | does cause auto-reverting. This is because making changes to a file, |
| 77 | or saving it, very often causes changes in the directory itself, for | 78 | or saving it, very often causes changes in the directory itself; for |
| 78 | instance, through backup files or auto-save files. However, this is | 79 | instance, through backup files or auto-save files. However, this is |
| 79 | not guaranteed. | 80 | not guaranteed. |
| 80 | 81 | ||
| @@ -91,10 +92,10 @@ If you want auto-reverting to resume in the presence of marks and | |||
| 91 | flags, mark the buffer non-modified using @kbd{M-~}. However, adding, | 92 | flags, mark the buffer non-modified using @kbd{M-~}. However, adding, |
| 92 | deleting or changing marks or flags will mark it modified again. | 93 | deleting or changing marks or flags will mark it modified again. |
| 93 | 94 | ||
| 94 | Remote Dired buffers are not auto-reverted. Neither are Dired buffers | 95 | Remote Dired buffers are not auto-reverted (because it may be slow). |
| 95 | for which you used shell wildcards or file arguments to list only some | 96 | Neither are Dired buffers for which you used shell wildcards or file |
| 96 | of the files. @samp{*Find*} and @samp{*Locate*} buffers do not | 97 | arguments to list only some of the files. @samp{*Find*} and |
| 97 | auto-revert either. | 98 | @samp{*Locate*} buffers do not auto-revert either. |
| 98 | 99 | ||
| 99 | @node Supporting additional buffers | 100 | @node Supporting additional buffers |
| 100 | @subsection Adding Support for Auto-Reverting additional Buffers. | 101 | @subsection Adding Support for Auto-Reverting additional Buffers. |
| @@ -127,7 +128,7 @@ If the function is only going to be used for auto-reverting, you can | |||
| 127 | ignore the @var{noconfirm} argument. | 128 | ignore the @var{noconfirm} argument. |
| 128 | 129 | ||
| 129 | If you just want to automatically auto-revert every | 130 | If you just want to automatically auto-revert every |
| 130 | @code{auto-revert-interval} seconds, use: | 131 | @code{auto-revert-interval} seconds (like the Buffer Menu), use: |
| 131 | 132 | ||
| 132 | @example | 133 | @example |
| 133 | (set (make-local-variable 'buffer-stale-function) | 134 | (set (make-local-variable 'buffer-stale-function) |
| @@ -153,7 +154,7 @@ Once the buffer has a @code{revert-buffer-function} and a | |||
| 153 | The buffer will only auto-revert if it is marked unmodified. Hence, | 154 | The buffer will only auto-revert if it is marked unmodified. Hence, |
| 154 | you will have to make sure that various functions mark the buffer | 155 | you will have to make sure that various functions mark the buffer |
| 155 | modified if and only if either the buffer contains information that | 156 | modified if and only if either the buffer contains information that |
| 156 | might be lost by reverting or there is reason to believe that the user | 157 | might be lost by reverting, or there is reason to believe that the user |
| 157 | might be inconvenienced by auto-reverting, because he is actively | 158 | might be inconvenienced by auto-reverting, because he is actively |
| 158 | working on the buffer. The user can always override this by manually | 159 | working on the buffer. The user can always override this by manually |
| 159 | adjusting the modified status of the buffer. To support this, calling | 160 | adjusting the modified status of the buffer. To support this, calling |
| @@ -165,21 +166,21 @@ as a consequence of auto-reverting. Of course, moving point might be | |||
| 165 | inevitable if the buffer radically changes. | 166 | inevitable if the buffer radically changes. |
| 166 | 167 | ||
| 167 | You should make sure that the @code{revert-buffer-function} does not | 168 | You should make sure that the @code{revert-buffer-function} does not |
| 168 | print messages that unnecessarily duplicate Auto Revert's own messages | 169 | print messages that unnecessarily duplicate Auto Revert's own messages, |
| 169 | if @code{auto-revert-verbose} is @code{t} and effectively override a | 170 | displayed if @code{auto-revert-verbose} is @code{t}, and effectively |
| 170 | @code{nil} value for @code{auto-revert-verbose}. Hence, adapting a | 171 | override a @code{nil} value for @code{auto-revert-verbose}. Hence, |
| 171 | mode for auto-reverting often involves getting rid of such messages. | 172 | adapting a mode for auto-reverting often involves getting rid of such |
| 172 | This is especially important for buffers that automatically | 173 | messages. This is especially important for buffers that automatically |
| 173 | auto-revert every @code{auto-revert-interval} seconds. | 174 | revert every @code{auto-revert-interval} seconds. |
| 174 | 175 | ||
| 175 | Also, you may want to update the documentation string of | 176 | If the new auto-reverting is part of Emacs, you should mention it |
| 176 | @code{global-auto-revert-non-file-buffers}. | 177 | in the documentation string of @code{global-auto-revert-non-file-buffers}. |
| 177 | 178 | ||
| 178 | @ifinfo | 179 | @ifinfo |
| 179 | Finally, you should add a node to this chapter's menu. This node | 180 | Similarly, you should add a node to this chapter's menu. This node |
| 180 | @end ifinfo | 181 | @end ifinfo |
| 181 | @ifnotinfo | 182 | @ifnotinfo |
| 182 | Finally, you should add a section to this chapter. This section | 183 | Similarly, you should add a section to this chapter. This section |
| 183 | @end ifnotinfo | 184 | @end ifnotinfo |
| 184 | should at the very least make clear whether enabling auto-reverting | 185 | should at the very least make clear whether enabling auto-reverting |
| 185 | for the buffer reliably assures that all information in the buffer is | 186 | for the buffer reliably assures that all information in the buffer is |