aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2019-04-30 22:35:56 +0200
committerMattias EngdegÄrd2019-05-05 11:47:14 +0200
commitab64228883126791cba85de0641592203d5ae820 (patch)
treeec87c665342518713b49b9e90b0fc68fb186bffe
parentb5aeb86a7ef4c5cbfbbd95e72568b4b5e48e9bae (diff)
downloademacs-ab64228883126791cba85de0641592203d5ae820.tar.gz
emacs-ab64228883126791cba85de0641592203d5ae820.zip
Reorganise (auto-)revert nodes in the manual
Put all information about auto-revert into a section of its own, and organise the text in a more logical way. Previously it was mainly described in the section about reverting (bug#35418). * doc/emacs/files.texi (Files): Adjust menu. (Reverting, Auto Revert, Autorevert): Add node `Auto Revert' and move text on that topic from `Reverting', rearranged. Turn the old `Autorevert' node into a subsection under `Auto Revert'. * doc/emacs/arevert-xtra.texi (Autorevert): Rename and turn into subsubsection. * doc/emacs/buffers.texi (Several Buffers): Adjust references. * doc/emacs/emacs.texi (Top): Adjust menu. * doc/emacs/emacs-xtra.texi (Top): Adjust menu. (Non-File Buffers): Add node and section lines.
-rw-r--r--doc/emacs/arevert-xtra.texi9
-rw-r--r--doc/emacs/buffers.texi4
-rw-r--r--doc/emacs/emacs-xtra.texi2
-rw-r--r--doc/emacs/emacs.texi4
-rw-r--r--doc/emacs/files.texi75
5 files changed, 51 insertions, 43 deletions
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi
index cd7c1ff895e..9e01a10ace9 100644
--- a/doc/emacs/arevert-xtra.texi
+++ b/doc/emacs/arevert-xtra.texi
@@ -4,8 +4,9 @@
4@c 4@c
5@c This file is included either in emacs-xtra.texi (when producing the 5@c This file is included either in emacs-xtra.texi (when producing the
6@c printed version) or in the main Emacs manual (for the on-line version). 6@c printed version) or in the main Emacs manual (for the on-line version).
7@node Autorevert 7
8@section Auto Reverting Non-File Buffers 8@node Non-File Buffers
9@subsection Auto Reverting Non-File Buffers
9 10
10Global Auto Revert Mode normally only reverts file buffers. There are 11Global Auto Revert Mode normally only reverts file buffers. There are
11two ways to auto-revert certain non-file buffers: by enabling Auto 12two ways to auto-revert certain non-file buffers: by enabling Auto
@@ -43,7 +44,7 @@ explained in the corresponding sections.
43@end menu 44@end menu
44 45
45@node Auto Reverting the Buffer Menu 46@node Auto Reverting the Buffer Menu
46@subsection Auto Reverting the Buffer Menu 47@subsubsection Auto Reverting the Buffer Menu
47 48
48If auto-reverting of non-file buffers is enabled, the Buffer Menu 49If auto-reverting of non-file buffers is enabled, the Buffer Menu
49@iftex 50@iftex
@@ -65,7 +66,7 @@ adding marks sets the buffer's modified flag prevents Auto Revert from
65automatically erasing the marks. 66automatically erasing the marks.
66 67
67@node Auto Reverting Dired 68@node Auto Reverting Dired
68@subsection Auto Reverting Dired buffers 69@subsubsection Auto Reverting Dired buffers
69 70
70Dired buffers only auto-revert when the file list of the buffer's main 71Dired buffers only auto-revert when the file list of the buffer's main
71directory changes (e.g., when a new file is added or deleted). They 72directory changes (e.g., when a new file is added or deleted). They
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index 27fcb7369a9..14a0a01ca8b 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -568,10 +568,10 @@ mode in this buffer, as long as it is not marked modified. Global
568Auto Revert mode applies to the @file{*Buffer List*} buffer only if 568Auto Revert mode applies to the @file{*Buffer List*} buffer only if
569@code{global-auto-revert-non-file-buffers} is non-@code{nil}. 569@code{global-auto-revert-non-file-buffers} is non-@code{nil}.
570@iftex 570@iftex
571@inforef{Autorevert,, emacs-xtra}, for details. 571@inforef{Auto Reverting the Buffer Menu,, emacs-xtra}, for details.
572@end iftex 572@end iftex
573@ifnottex 573@ifnottex
574@xref{Autorevert, global-auto-revert-non-file-buffers}, for details. 574@xref{Auto Reverting the Buffer Menu, global-auto-revert-non-file-buffers}, for details.
575@end ifnottex 575@end ifnottex
576 576
577@node Indirect Buffers 577@node Indirect Buffers
diff --git a/doc/emacs/emacs-xtra.texi b/doc/emacs/emacs-xtra.texi
index dcd8fae1b61..e9231b4e3a9 100644
--- a/doc/emacs/emacs-xtra.texi
+++ b/doc/emacs/emacs-xtra.texi
@@ -59,7 +59,7 @@ modify this GNU manual.''
59* Picture Mode:: Editing pictures made up of characters using 59* Picture Mode:: Editing pictures made up of characters using
60 the quarter-plane screen model. 60 the quarter-plane screen model.
61 61
62* Autorevert:: Auto Reverting non-file buffers. 62* Non-File Buffers:: Auto Reverting non-file buffers.
63* Subdir Switches:: Subdirectory switches in Dired. 63* Subdir Switches:: Subdirectory switches in Dired.
64* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization. 64* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization.
65* Emerge:: A convenient way of merging two versions of a program. 65* Emerge:: A convenient way of merging two versions of a program.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 58ec3730299..a34cef221e1 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -443,9 +443,7 @@ File Handling
443* Visiting:: Visiting a file prepares Emacs to edit the file. 443* Visiting:: Visiting a file prepares Emacs to edit the file.
444* Saving:: Saving makes your changes permanent. 444* Saving:: Saving makes your changes permanent.
445* Reverting:: Reverting cancels all the changes not saved. 445* Reverting:: Reverting cancels all the changes not saved.
446@ifnottex 446* Auto Revert:: Keeping buffers automatically up-to-date.
447* Autorevert:: Auto Reverting non-file buffers.
448@end ifnottex
449* Auto Save:: Auto Save periodically protects against loss of data. 447* Auto Save:: Auto Save periodically protects against loss of data.
450* File Aliases:: Handling multiple names for one file. 448* File Aliases:: Handling multiple names for one file.
451* Directories:: Creating, deleting, and listing file directories. 449* Directories:: Creating, deleting, and listing file directories.
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 990b8f16795..c51d076fa28 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -25,9 +25,7 @@ on file directories.
25* Visiting:: Visiting a file prepares Emacs to edit the file. 25* Visiting:: Visiting a file prepares Emacs to edit the file.
26* Saving:: Saving makes your changes permanent. 26* Saving:: Saving makes your changes permanent.
27* Reverting:: Reverting cancels all the changes not saved. 27* Reverting:: Reverting cancels all the changes not saved.
28@ifnottex 28* Auto Revert:: Keeping buffers automatically up-to-date.
29* Autorevert:: Auto Reverting non-file buffers.
30@end ifnottex
31* Auto Save:: Auto Save periodically protects against loss of data. 29* Auto Save:: Auto Save periodically protects against loss of data.
32* File Aliases:: Handling multiple names for one file. 30* File Aliases:: Handling multiple names for one file.
33* Directories:: Creating, deleting, and listing file directories. 31* Directories:: Creating, deleting, and listing file directories.
@@ -955,6 +953,11 @@ revert it automatically if it has changed---provided the buffer itself
955is not modified. (If you have edited the text, it would be wrong to 953is not modified. (If you have edited the text, it would be wrong to
956discard your changes.) 954discard your changes.)
957 955
956 You can also tell Emacs to revert buffers automatically when their
957visited files change on disk; @pxref{Auto Revert}.
958
959@node Auto Revert
960@section Auto Revert: Keeping buffers automatically up-to-date
958@cindex Global Auto Revert mode 961@cindex Global Auto Revert mode
959@cindex mode, Global Auto Revert 962@cindex mode, Global Auto Revert
960@cindex Auto Revert mode 963@cindex Auto Revert mode
@@ -962,22 +965,39 @@ discard your changes.)
962@findex global-auto-revert-mode 965@findex global-auto-revert-mode
963@findex auto-revert-mode 966@findex auto-revert-mode
964@findex auto-revert-tail-mode 967@findex auto-revert-tail-mode
965@vindex auto-revert-interval 968
966@vindex auto-revert-remote-files 969 A buffer can get out of sync with respect to its visited file on
970disk if that file is changed by another program. To keep it up to
971date, you can enable Auto Revert mode by typing @kbd{M-x auto-revert-mode}.
972This automatically reverts the buffer when its visited file changes on
973disk. To do the same for all file buffers, type
974@kbd{M-x global-auto-revert-mode} to enable Global Auto Revert mode.
975
976 Auto Revert will not revert a buffer if it has unsaved changes, or if
977its file on disk is deleted or renamed.
978
979 One use of Auto Revert mode is to ``tail'' a file such as a system
980log, so that changes made to that file by other programs are
981continuously displayed. To do this, just move the point to the end of
982the buffer, and it will stay there as the file contents change.
983However, if you are sure that the file will only change by growing at
984the end, use Auto Revert Tail mode instead
985(@code{auto-revert-tail-mode}). It is more efficient for this.
986Auto Revert Tail mode also works for remote files.
987
967@vindex auto-revert-verbose 988@vindex auto-revert-verbose
968 You can also tell Emacs to revert buffers periodically. To do this 989 When a buffer is auto-reverted, a message is generated. This can be
969for a specific buffer, enable the minor mode Auto-Revert mode by 990suppressed by setting @code{auto-revert-verbose} to @code{nil}.
970typing @kbd{M-x auto-revert-mode}. This automatically reverts the 991
971current buffer when its visited file changes on disk. To do the same 992@vindex auto-revert-remote-files
972for all file buffers, type @kbd{M-x global-auto-revert-mode} to enable 993 The Auto Revert modes do not check or revert remote files, because
973Global Auto-Revert mode. These minor modes do not check or revert 994that is usually too slow. This behavior can be changed by setting the
974remote files, because that is usually too slow. This behavior can be 995variable @code{auto-revert-remote-files} to non-@code{nil}.
975changed by setting the variable @code{auto-revert-remote-files} to
976non-@code{nil}.
977 996
978@cindex file notifications 997@cindex file notifications
979@vindex auto-revert-use-notify 998@vindex auto-revert-use-notify
980 By default, Auto-Revert mode works using @dfn{file notifications}, 999@vindex auto-revert-interval
1000 By default, Auto Revert mode works using @dfn{file notifications},
981whereby changes in the filesystem are reported to Emacs by the OS. 1001whereby changes in the filesystem are reported to Emacs by the OS.
982You can disable use of file notifications by customizing the variable 1002You can disable use of file notifications by customizing the variable
983@code{auto-revert-use-notify} to a @code{nil} value, then Emacs will 1003@code{auto-revert-use-notify} to a @code{nil} value, then Emacs will
@@ -990,31 +1010,20 @@ default.
990 1010
991@vindex auto-revert-avoid-polling 1011@vindex auto-revert-avoid-polling
992@vindex auto-revert-notify-exclude-dir-regexp 1012@vindex auto-revert-notify-exclude-dir-regexp
993 By default, Auto-Revert mode will poll files for changes 1013 By default, Auto Revert mode will poll files for changes
994periodically even when file notifications are used. Such polling is 1014periodically even when file notifications are used. Polling is
995usually unnecessary, and turning it off may save power by relying on 1015unnecessary in many cases, and turning it off may save power by
996notifications only. To do so, set the variable 1016relying on notifications only. To do so, set the variable
997@code{auto-revert-avoid-polling} to non-@code{nil}. However, 1017@code{auto-revert-avoid-polling} to non-@code{nil}. However,
998notification is ineffective on certain file systems; mainly network 1018notification is ineffective on certain file systems; mainly network
999file system on Unix-like machines, where files can be altered from 1019file system on Unix-like machines, where files can be altered from
1000other machines. To force polling when 1020other machines. For such file systems, polling may be necessary.
1021To force polling when
1001@code{auto-revert-avoid-polling} is non-@code{nil}, set 1022@code{auto-revert-avoid-polling} is non-@code{nil}, set
1002@code{auto-revert-notify-exclude-dir-regexp} to match files that 1023@code{auto-revert-notify-exclude-dir-regexp} to match files that
1003should be excluded from using notification. 1024should be excluded from using notification.
1004 1025
1005 One use of Auto-Revert mode is to ``tail'' a file such as a system 1026 In Dired buffers (@pxref{Dired}), Auto Revert mode refreshes the
1006log, so that changes made to that file by other programs are
1007continuously displayed. To do this, just move the point to the end of
1008the buffer, and it will stay there as the file contents change.
1009However, if you are sure that the file will only change by growing at
1010the end, use Auto-Revert Tail mode instead
1011(@code{auto-revert-tail-mode}). It is more efficient for this.
1012Auto-Revert Tail mode works also for remote files.
1013
1014 When a buffer is auto-reverted, a message is generated. This can be
1015suppressed by setting @code{auto-revert-verbose} to @code{nil}.
1016
1017 In Dired buffers (@pxref{Dired}), Auto-Revert mode refreshes the
1018buffer when a file is created or deleted in the buffer's directory. 1027buffer when a file is created or deleted in the buffer's directory.
1019 1028
1020 @xref{VC Undo}, for commands to revert to earlier versions of files 1029 @xref{VC Undo}, for commands to revert to earlier versions of files