aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2006-02-02 04:27:32 +0000
committerRichard M. Stallman2006-02-02 04:27:32 +0000
commit50a1bd4fe797e8295cda5085b8eefbf421ac9408 (patch)
tree4c9d5b59effac85ce5e5316524fa9af2ba0b822b
parent174862cf6efe82bf46fab225e78a34ccb743992f (diff)
downloademacs-50a1bd4fe797e8295cda5085b8eefbf421ac9408.tar.gz
emacs-50a1bd4fe797e8295cda5085b8eefbf421ac9408.zip
Minor clarifications.
(Numbered Backups): New node, split out from Backup Names.
-rw-r--r--man/files.texi307
1 files changed, 159 insertions, 148 deletions
diff --git a/man/files.texi b/man/files.texi
index 7b08fc5c791..b3cd615638c 100644
--- a/man/files.texi
+++ b/man/files.texi
@@ -68,21 +68,22 @@ a slash, it is interpreted with respect to the default directory. The
68default directory is kept in the variable @code{default-directory}, 68default directory is kept in the variable @code{default-directory},
69which has a separate value in every buffer. 69which has a separate value in every buffer.
70 70
71 For example, if the default file name is @file{/u/rms/gnu/gnu.tasks} then
72the default directory is @file{/u/rms/gnu/}. If you type just @samp{foo},
73which does not specify a directory, it is short for @file{/u/rms/gnu/foo}.
74@samp{../.login} would stand for @file{/u/rms/.login}. @samp{new/foo}
75would stand for the file name @file{/u/rms/gnu/new/foo}.
76
77@findex cd 71@findex cd
78@findex pwd 72@findex pwd
79 The command @kbd{M-x pwd} displays the current buffer's default 73 The command @kbd{M-x pwd} displays the current buffer's default
80directory, and the command @kbd{M-x cd} sets it (to a value read using 74directory, and the command @kbd{M-x cd} sets it (to a value read using
81the minibuffer). A buffer's default directory changes only when the 75the minibuffer). A buffer's default directory changes only when the
82@code{cd} command is used. A file-visiting buffer's default directory 76@code{cd} command is used. A file-visiting buffer's default directory
83is initialized to the directory of the file that is visited in that buffer. If 77is initialized to the directory of the file it visits. If you create
84you create a buffer with @kbd{C-x b}, its default directory is copied 78a buffer with @kbd{C-x b}, its default directory is copied from that
85from that of the buffer that was current at the time. 79of the buffer that was current at the time.
80
81 For example, if the default file name is @file{/u/rms/gnu/gnu.tasks}
82then the default directory is normally @file{/u/rms/gnu/}. If you
83type just @samp{foo}, which does not specify a directory, it is short
84for @file{/u/rms/gnu/foo}. @samp{../.login} would stand for
85@file{/u/rms/.login}. @samp{new/foo} would stand for the file name
86@file{/u/rms/gnu/new/foo}.
86 87
87@vindex insert-default-directory 88@vindex insert-default-directory
88 The default directory actually appears in the minibuffer when the 89 The default directory actually appears in the minibuffer when the
@@ -102,6 +103,14 @@ with @samp{/usr/tmp/} and you add @samp{/x1/rms/foo}, you get
102first slash in the double slash; the result is @samp{/x1/rms/foo}. 103first slash in the double slash; the result is @samp{/x1/rms/foo}.
103@xref{Minibuffer File}. 104@xref{Minibuffer File}.
104 105
106@cindex home directory shorthand
107 You can use @file{~/} in a file name to mean your home directory,
108or @file{~@var{user-id}/} to mean the home directory of a user whose
109login name is @code{user-id}. (On DOS and Windows systems, where a user
110doesn't have a home directory, Emacs substitutes @file{~/} with the
111value of the environment variable @code{HOME}; see @ref{General
112Variables}.)
113
105@cindex environment variables in file names 114@cindex environment variables in file names
106@cindex expansion of environment variables 115@cindex expansion of environment variables
107@cindex @code{$} in file names 116@cindex @code{$} in file names
@@ -120,14 +129,6 @@ is not defined).
120 Note that shell commands to set environment variables affect Emacs 129 Note that shell commands to set environment variables affect Emacs
121only when done before Emacs is started. 130only when done before Emacs is started.
122 131
123@cindex home directory shorthand
124 You can use @file{~/} in a file name to mean your home directory,
125or @file{~@var{user-id}/} to mean the home directory of a user whose
126login name is @code{user-id}. (On DOS and Windows systems, where a user
127doesn't have a home directory, Emacs substitutes @file{~/} with the
128value of the environment variable @code{HOME}; see @ref{General
129Variables}.)
130
131 To access a file with @samp{$} in its name, if the @samp{$} causes 132 To access a file with @samp{$} in its name, if the @samp{$} causes
132expansion, type @samp{$$}. This pair is converted to a single 133expansion, type @samp{$$}. This pair is converted to a single
133@samp{$} at the same time as variable substitution is performed for a 134@samp{$} at the same time as variable substitution is performed for a
@@ -136,7 +137,7 @@ single @samp{$}. Alternatively, quote the whole file name with
136literal @samp{~} should also be quoted with @samp{/:}. 137literal @samp{~} should also be quoted with @samp{/:}.
137 138
138@findex substitute-in-file-name 139@findex substitute-in-file-name
139 The Lisp function that performs the substitution is called 140 The Lisp function that performs the @samp{$}-substitution is called
140@code{substitute-in-file-name}. The substitution is performed only on 141@code{substitute-in-file-name}. The substitution is performed only on
141file names read as such using the minibuffer. 142file names read as such using the minibuffer.
142 143
@@ -185,7 +186,7 @@ in that window, so you can always tell what buffer you are editing.
185 186
186 The changes you make with editing commands are made in the Emacs 187 The changes you make with editing commands are made in the Emacs
187buffer. They do not take effect in the file that you visited, or any 188buffer. They do not take effect in the file that you visited, or any
188place permanent, until you @dfn{save} the buffer. Saving the buffer 189permanent place, until you @dfn{save} the buffer. Saving the buffer
189means that Emacs writes the current contents of the buffer into its 190means that Emacs writes the current contents of the buffer into its
190visited file. @xref{Saving}. 191visited file. @xref{Saving}.
191 192
@@ -208,17 +209,17 @@ While in the minibuffer, you can abort @kbd{C-x C-f} by typing
208@kbd{C-g}. File-name completion ignores certain filenames; for more 209@kbd{C-g}. File-name completion ignores certain filenames; for more
209about this, see @ref{Completion Options}. 210about this, see @ref{Completion Options}.
210 211
211 Your confirmation that @kbd{C-x C-f} has completed successfully is the 212 Your confirmation that @kbd{C-x C-f} has completed successfully is
212appearance of new text on the screen and a new buffer name in the mode 213the appearance of new text on the screen and a new buffer name in the
213line. If the specified file does not exist and could not be created, or 214mode line. If the specified file does not exist and you could not
214cannot be read, then you get an error, with an error message displayed 215create it, or exists but you can't read it, then you get an error,
215in the echo area. 216with an error message displayed in the echo area.
216 217
217 If you visit a file that is already in Emacs, @kbd{C-x C-f} does not make 218 If you visit a file that is already in Emacs, @kbd{C-x C-f} does not make
218another copy. It selects the existing buffer containing that file. 219another copy. It selects the existing buffer containing that file.
219However, before doing so, it checks that the file itself has not changed 220However, before doing so, it checks whether the file itself has changed
220since you visited or saved it last. If the file has changed, a warning 221since you visited or saved it last. If the file has changed, Emacs offers
221message is shown. @xref{Interlocking,,Simultaneous Editing}. 222to reread it.
222 223
223@vindex large-file-warning-threshold 224@vindex large-file-warning-threshold
224@cindex maximum buffer size exceeded, error message 225@cindex maximum buffer size exceeded, error message
@@ -232,7 +233,7 @@ buffer size, which is around 256 megabytes on 32-bit machines
232saying that the maximum buffer size has been exceeded. 233saying that the maximum buffer size has been exceeded.
233 234
234@cindex file selection dialog 235@cindex file selection dialog
235 On graphical terminals, there are two additional methods for 236 On graphical displays there are two additional methods for
236visiting files. Firstly, when Emacs is built with a suitable GUI 237visiting files. Firstly, when Emacs is built with a suitable GUI
237toolkit, commands invoked with the mouse (by clicking on the menu bar 238toolkit, commands invoked with the mouse (by clicking on the menu bar
238or tool bar) use the toolkit's standard File Selection dialog instead 239or tool bar) use the toolkit's standard File Selection dialog instead
@@ -313,9 +314,6 @@ buffer (after first offering to save it if it is modified). When
313default file name in the buffer, with point just after the directory 314default file name in the buffer, with point just after the directory
314part; this is convenient if you made a slight error in typing the name. 315part; this is convenient if you made a slight error in typing the name.
315 316
316 If you find a file which exists but cannot be read, @kbd{C-x C-f}
317signals an error.
318
319@kindex C-x 4 f 317@kindex C-x 4 f
320@findex find-file-other-window 318@findex find-file-other-window
321 @kbd{C-x 4 f} (@code{find-file-other-window}) is like @kbd{C-x C-f} 319 @kbd{C-x 4 f} (@code{find-file-other-window}) is like @kbd{C-x C-f}
@@ -392,7 +390,7 @@ Save any or all buffers in their visited files (@code{save-some-buffers}).
392Forget that the current buffer has been changed (@code{not-modified}). 390Forget that the current buffer has been changed (@code{not-modified}).
393With prefix argument (@kbd{C-u}), mark the current buffer as changed. 391With prefix argument (@kbd{C-u}), mark the current buffer as changed.
394@item C-x C-w 392@item C-x C-w
395Save the current buffer as a specified file name (@code{write-file}). 393Save the current buffer with a specified file name (@code{write-file}).
396@item M-x set-visited-file-name 394@item M-x set-visited-file-name
397Change the file name under which the current buffer will be saved. 395Change the file name under which the current buffer will be saved.
398@end table 396@end table
@@ -464,9 +462,9 @@ saved. (@samp{~} is often used as a mathematical symbol for `not'; thus
464a different file name, one which is not in use for anything important. 462a different file name, one which is not in use for anything important.
465Alternatively, you can cancel all the changes made since the file was 463Alternatively, you can cancel all the changes made since the file was
466visited or saved, by reading the text from the file again. This is 464visited or saved, by reading the text from the file again. This is
467called @dfn{reverting}. @xref{Reverting}. You could also undo all the 465called @dfn{reverting}. @xref{Reverting}. (You could also undo all the
468changes by repeating the undo command @kbd{C-x u} until you have undone 466changes by repeating the undo command @kbd{C-x u} until you have undone
469all the changes; but reverting is easier. 467all the changes; but reverting is easier.) You can also kill the buffer.
470 468
471@findex set-visited-file-name 469@findex set-visited-file-name
472 @kbd{M-x set-visited-file-name} alters the name of the file that the 470 @kbd{M-x set-visited-file-name} alters the name of the file that the
@@ -522,6 +520,9 @@ to make backup files. By default it is @code{nil}, since backup files
522are redundant when you store all the previous versions in a version 520are redundant when you store all the previous versions in a version
523control system. @xref{General VC Options}. 521control system. @xref{General VC Options}.
524 522
523 At your option, Emacs can keep either a single backup for each file,
524or make a series of numbered backup files for each file that you edit.
525
525@vindex backup-enable-predicate 526@vindex backup-enable-predicate
526@vindex temporary-file-directory 527@vindex temporary-file-directory
527@vindex small-temporary-file-directory 528@vindex small-temporary-file-directory
@@ -530,9 +531,6 @@ prevents backup files being written for files in the directories used
530for temporary files, specified by @code{temporary-file-directory} or 531for temporary files, specified by @code{temporary-file-directory} or
531@code{small-temporary-file-directory}. 532@code{small-temporary-file-directory}.
532 533
533 At your option, Emacs can keep either a single backup file or a series of
534numbered backup files for each file that you edit.
535
536 Emacs makes a backup for a file only the first time the file is saved 534 Emacs makes a backup for a file only the first time the file is saved
537from one buffer. No matter how many times you save a file, its backup file 535from one buffer. No matter how many times you save a file, its backup file
538continues to contain the contents from before the file was visited. 536continues to contain the contents from before the file was visited.
@@ -550,19 +548,54 @@ backup from the previous contents, and arranges to make another from the
550newly saved contents if you save again. 548newly saved contents if you save again.
551 549
552@menu 550@menu
553* Names: Backup Names. How backup files are named; 551* One or More: Numbered Backups. Whether to make one backup file or many.
554 choosing single or numbered backup files. 552* Names: Backup Names. How backup files are named.
555* Deletion: Backup Deletion. Emacs deletes excess numbered backups. 553* Deletion: Backup Deletion. Emacs deletes excess numbered backups.
556* Copying: Backup Copying. Backups can be made by copying or renaming. 554* Copying: Backup Copying. Backups can be made by copying or renaming.
557@end menu 555@end menu
558 556
557@node Numbered Backups
558@subsubsection Numbered Backups
559
560@vindex version-control
561 The choice of single backup file or multiple numbered backup files
562is controlled by the variable @code{version-control}. Its possible
563values are:
564
565@table @code
566@item t
567Make numbered backups.
568@item nil
569Make numbered backups for files that have numbered backups already.
570Otherwise, make single backups.
571@item never
572Never make numbered backups; always make single backups.
573@end table
574
575@noindent
576The usual way to set this variable is globally, through your
577@file{.emacs} file or the customization buffer. However, you can set
578@code{version-control} locally in an individual buffer to control the
579making of backups for that buffer's file. For example, Rmail mode
580locally sets @code{version-control} to @code{never} to make sure that
581there is only one backup for an Rmail file. @xref{Locals}.
582
583@cindex @env{VERSION_CONTROL} environment variable
584 If you set the environment variable @env{VERSION_CONTROL}, to tell
585various GNU utilities what to do with backup files, Emacs also obeys the
586environment variable by setting the Lisp variable @code{version-control}
587accordingly at startup. If the environment variable's value is @samp{t}
588or @samp{numbered}, then @code{version-control} becomes @code{t}; if the
589value is @samp{nil} or @samp{existing}, then @code{version-control}
590becomes @code{nil}; if it is @samp{never} or @samp{simple}, then
591@code{version-control} becomes @code{never}.
592
559@node Backup Names 593@node Backup Names
560@subsubsection Single or Numbered Backups 594@subsubsection Single or Numbered Backups
561 595
562 If you choose to have a single backup file (this is the default), 596 When Emacs makes a single backup file, its name is normally
563the backup file's name is normally constructed by appending @samp{~} to the 597constructed by appending @samp{~} to the file name being edited; thus,
564file name being edited; thus, the backup file for @file{eval.c} would 598the backup file for @file{eval.c} would be @file{eval.c~}.
565be @file{eval.c~}.
566 599
567@vindex make-backup-file-name-function 600@vindex make-backup-file-name-function
568@vindex backup-directory-alist 601@vindex backup-directory-alist
@@ -593,36 +626,6 @@ through names like @file{eval.c.~259~} and beyond. The variable
593@code{backup-directory-alist} applies to numbered backups just as 626@code{backup-directory-alist} applies to numbered backups just as
594usual. 627usual.
595 628
596@vindex version-control
597 The choice of single backup or numbered backups is controlled by the
598variable @code{version-control}. Its possible values are
599
600@table @code
601@item t
602Make numbered backups.
603@item nil
604Make numbered backups for files that have numbered backups already.
605Otherwise, make single backups.
606@item never
607Never make numbered backups; always make single backups.
608@end table
609
610@noindent
611You can set @code{version-control} locally in an individual buffer to
612control the making of backups for that buffer's file. For example,
613Rmail mode locally sets @code{version-control} to @code{never} to make sure
614that there is only one backup for an Rmail file. @xref{Locals}.
615
616@cindex @env{VERSION_CONTROL} environment variable
617 If you set the environment variable @env{VERSION_CONTROL}, to tell
618various GNU utilities what to do with backup files, Emacs also obeys the
619environment variable by setting the Lisp variable @code{version-control}
620accordingly at startup. If the environment variable's value is @samp{t}
621or @samp{numbered}, then @code{version-control} becomes @code{t}; if the
622value is @samp{nil} or @samp{existing}, then @code{version-control}
623becomes @code{nil}; if it is @samp{never} or @samp{simple}, then
624@code{version-control} becomes @code{never}.
625
626@node Backup Deletion 629@node Backup Deletion
627@subsubsection Automatic Deletion of Backups 630@subsubsection Automatic Deletion of Backups
628 631
@@ -822,6 +825,7 @@ different name, and use @code{diff} to compare the two files.@refill
822@subsection Shadowing Files 825@subsection Shadowing Files
823@cindex shadow files 826@cindex shadow files
824@cindex file shadows 827@cindex file shadows
828@findex shadow-initialize
825 829
826@table @kbd 830@table @kbd
827@item M-x shadow-initialize 831@item M-x shadow-initialize
@@ -867,7 +871,6 @@ shadow-define-cluster}.
867 871
868@node Time Stamps 872@node Time Stamps
869@subsection Updating Time Stamps Automatically 873@subsection Updating Time Stamps Automatically
870@findex time-stamp
871@cindex time stamps 874@cindex time stamps
872@cindex modification dates 875@cindex modification dates
873@cindex locale, date format 876@cindex locale, date format
@@ -888,6 +891,7 @@ or like this:
888Time-stamp: " " 891Time-stamp: " "
889@end example 892@end example
890 893
894@findex time-stamp
891 Then add the hook function @code{time-stamp} to the hook 895 Then add the hook function @code{time-stamp} to the hook
892@code{before-save-hook}; that hook function will automatically update 896@code{before-save-hook}; that hook function will automatically update
893the time stamp, inserting the current date and time when you save the 897the time stamp, inserting the current date and time when you save the
@@ -946,24 +950,26 @@ discard your changes.)
946 You may find it useful to have Emacs revert files automatically when 950 You may find it useful to have Emacs revert files automatically when
947they change. Three minor modes are available to do this. 951they change. Three minor modes are available to do this.
948 952
949 @kbd{M-x global-auto-revert-mode} runs Global Auto-Revert mode, 953 @kbd{M-x global-auto-revert-mode} enables Global Auto-Revert mode,
950which periodically checks all file buffers and reverts when the 954which periodically checks all file buffers and reverts when the
951corresponding file has changed. @kbd{M-x auto-revert-mode} runs a 955corresponding file has changed. @kbd{M-x auto-revert-mode} enables a
952local version, Auto-Revert mode, which applies only to the buffer in 956local version, Auto-Revert mode, which applies only to the current
953which it was activated. Auto-Revert mode can be used to ``tail'' a 957buffer.
954file, such as a system log, so that changes made to that file by other 958
955programs are continuously displayed. To do this, just move the point 959 You can use Auto-Revert mode to ``tail'' a file such as a system
956to the end of the buffer, and it will stay there as the file contents 960log, so that changes made to that file by other programs are
957change. However, if you are sure that the file will only change by 961continuously displayed. To do this, just move the point to the end of
958growing at the end, you can tail the file more efficiently using 962the buffer, and it will stay there as the file contents change.
959Auto-Revert Tail mode, @kbd{M-x auto-revert-tail-mode}. 963However, if you are sure that the file will only change by growing at
964the end, use Auto-Revert Tail mode instead
965(@vcode{auto-revert-tail-mode}). It is more efficient for this.
960 966
961@vindex auto-revert-interval 967@vindex auto-revert-interval
962 The variable @code{auto-revert-interval} controls how often to check 968 The variable @code{auto-revert-interval} controls how often to check
963for a changed file. Since checking a remote file is too slow, these 969for a changed file. Since checking a remote file is too slow, these
964modes do not check or revert remote files. 970modes do not check or revert remote files.
965 971
966@xref{VC Mode Line}, for Auto Revert peculiarities in buffers that 972 @xref{VC Mode Line}, for Auto Revert peculiarities in buffers that
967visit files under version control. 973visit files under version control.
968 974
969@node Auto Save 975@node Auto Save
@@ -977,13 +983,13 @@ your keystrokes) without being asked. This is called @dfn{auto-saving}.
977It prevents you from losing more than a limited amount of work if the 983It prevents you from losing more than a limited amount of work if the
978system crashes. 984system crashes.
979 985
980 When Emacs determines that it is time for auto-saving, each buffer is 986 When Emacs determines that it is time for auto-saving, it considers
981considered, and is auto-saved if auto-saving is turned on for it and it 987each buffer, and each is auto-saved if auto-saving is enabled for it
982has been changed since the last time it was auto-saved. The message 988and it has been changed since the last time it was auto-saved. The
983@samp{Auto-saving...} is displayed in the echo area during auto-saving, 989message @samp{Auto-saving...} is displayed in the echo area during
984if any files are actually auto-saved. Errors occurring during 990auto-saving, if any files are actually auto-saved. Errors occurring
985auto-saving are caught so that they do not interfere with the execution 991during auto-saving are caught so that they do not interfere with the
986of commands you have been typing. 992execution of commands you have been typing.
987 993
988@menu 994@menu
989* Files: Auto Save Files. The file where auto-saved changes are 995* Files: Auto Save Files. The file where auto-saved changes are
@@ -1041,10 +1047,10 @@ saving.
1041 1047
1042@vindex delete-auto-save-files 1048@vindex delete-auto-save-files
1043 A buffer's auto-save file is deleted when you save the buffer in its 1049 A buffer's auto-save file is deleted when you save the buffer in its
1044visited file. To inhibit this, set the variable @code{delete-auto-save-files} 1050visited file. (You can inhibit this by setting the variable
1045to @code{nil}. Changing the visited file name with @kbd{C-x C-w} or 1051@code{delete-auto-save-files} to @code{nil}.) Changing the visited
1046@code{set-visited-file-name} renames any auto-save file to go with 1052file name with @kbd{C-x C-w} or @code{set-visited-file-name} renames
1047the new visited name. 1053any auto-save file to go with the new visited name.
1048 1054
1049@node Auto Save Control 1055@node Auto Save Control
1050@subsection Controlling Auto-Saving 1056@subsection Controlling Auto-Saving
@@ -1284,9 +1290,11 @@ merging, and use of symbolic links and meta-data in repositories.
1284terms of capabilities, it is the weakest of the six that VC supports. 1290terms of capabilities, it is the weakest of the six that VC supports.
1285VC compensates for certain features missing in SCCS (snapshots, for 1291VC compensates for certain features missing in SCCS (snapshots, for
1286example) by implementing them itself, but some other VC features, such 1292example) by implementing them itself, but some other VC features, such
1287as multiple branches, are not available with SCCS. You should use 1293as multiple branches, are not available with SCCS. Since SCCS is
1288SCCS only if for some reason you cannot use RCS, or one of the 1294non-free, not respecting its users freedom,d, you should not use it;
1289higher-level systems such as CVS or GNU Arch. 1295use its free replacement CSSC instead. But you should use CSSC only
1296if for some reason you cannot use RCS, or one of the higher-level
1297systems such as CVS or GNU Arch.
1290 1298
1291In the following, we discuss mainly RCS, SCCS and CVS. Nearly 1299In the following, we discuss mainly RCS, SCCS and CVS. Nearly
1292everything said about CVS applies to GNU Arch, Subversion and Meta-CVS 1300everything said about CVS applies to GNU Arch, Subversion and Meta-CVS
@@ -1549,13 +1557,13 @@ Version Control}).
1549 When you check in changes, @kbd{C-x v v} first reads a log entry. It 1557 When you check in changes, @kbd{C-x v v} first reads a log entry. It
1550pops up a buffer called @samp{*VC-Log*} for you to enter the log entry. 1558pops up a buffer called @samp{*VC-Log*} for you to enter the log entry.
1551 1559
1552Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it, 1560 Sometimes the @samp{*VC-Log*} buffer contains default text when you enter it,
1553typically the last log message entered. If it does, mark and point 1561typically the last log message entered. If it does, mark and point
1554are set around the entire contents of the buffer so that it is easy to 1562are set around the entire contents of the buffer so that it is easy to
1555kill the contents of the buffer with @kbd{C-w}. 1563kill the contents of the buffer with @kbd{C-w}.
1556 1564
1557@findex log-edit-insert-changelog 1565@findex log-edit-insert-changelog
1558If you work by writing entries in the @file{ChangeLog} 1566 If you work by writing entries in the @file{ChangeLog}
1559(@pxref{Change Log}) and then commit the change under revision 1567(@pxref{Change Log}) and then commit the change under revision
1560control, you can generate the Log Edit text from the ChangeLog using 1568control, you can generate the Log Edit text from the ChangeLog using
1561@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for 1569@kbd{C-c C-a} (@kbd{log-edit-insert-changelog}). This looks for
@@ -1565,13 +1573,13 @@ if the top entry was made under your user name on the current date.
1565@xref{Change Logs and VC}, for the opposite way of 1573@xref{Change Logs and VC}, for the opposite way of
1566working---generating ChangeLog entries from the revision control log. 1574working---generating ChangeLog entries from the revision control log.
1567 1575
1568In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files}) 1576 In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x log-edit-show-files})
1569shows the list of files to be committed in case you need to check 1577shows the list of files to be committed in case you need to check
1570that. (This can be a list of more than one file if you use VC Dired 1578that. (This can be a list of more than one file if you use VC Dired
1571mode or PCL-CVS. @xref{VC Dired Mode}, and @ref{Top, , About PCL-CVS, 1579mode or PCL-CVS. @xref{VC Dired Mode}, and @ref{Top, , About PCL-CVS,
1572pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.) 1580pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.)
1573 1581
1574When you have finished editing the log message, type @kbd{C-c C-c} to 1582 When you have finished editing the log message, type @kbd{C-c C-c} to
1575exit the buffer and commit the change. 1583exit the buffer and commit the change.
1576 1584
1577 To abort check-in, just @strong{don't} type @kbd{C-c C-c} in that 1585 To abort check-in, just @strong{don't} type @kbd{C-c C-c} in that
@@ -1665,8 +1673,8 @@ them; they exist only in the records of the master file.
1665 For some backends, you can display the file @dfn{annotated} with 1673 For some backends, you can display the file @dfn{annotated} with
1666per-line version information and using colors to enhance the visual 1674per-line version information and using colors to enhance the visual
1667appearance, with the command @kbd{M-x vc-annotate}. 1675appearance, with the command @kbd{M-x vc-annotate}.
1668It creates a new buffer 1676It creates a new buffer (the ``annotate buffer'') displaying the
1669to display file's text, colored to show how old each part is. Text 1677file's text, with each part colored to show how old it is. Text
1670colored red is new, blue means old, and intermediate colors indicate 1678colored red is new, blue means old, and intermediate colors indicate
1671intermediate ages. By default, the time scale is 360 days, so that 1679intermediate ages. By default, the time scale is 360 days, so that
1672everything more than one year old is shown in blue. 1680everything more than one year old is shown in blue.
@@ -1790,8 +1798,8 @@ changes to the current file, including the text of the log entries. The
1790output appears in a separate window. The point is centered at the 1798output appears in a separate window. The point is centered at the
1791revision of the file that is currently being visited. 1799revision of the file that is currently being visited.
1792 1800
1793From the change log buffer, the following keys are used to move 1801 In the change log buffer, you can use the following keys to move
1794between the logs of revisions and files, to view past revisions, and 1802between the logs of revisions and of files, to view past revisions, and
1795to view diffs: 1803to view diffs:
1796 1804
1797@table @kbd 1805@table @kbd
@@ -2410,14 +2418,16 @@ or a snapshot against a named version.
2410 2418
2411@cindex named configurations (RCS) 2419@cindex named configurations (RCS)
2412 VC's snapshot facilities are modeled on RCS's named-configuration 2420 VC's snapshot facilities are modeled on RCS's named-configuration
2413support. They use RCS's native facilities for this, so under VC 2421support. They use RCS's native facilities for this, so
2414snapshots made using RCS are visible even when you bypass VC. 2422snapshots made using RCS through VC are visible even when you bypass VC.
2415 2423
2416@c worded verbosely to avoid overfull hbox. 2424@c worded verbosely to avoid overfull hbox.
2417 For SCCS, VC implements snapshots itself. The files it uses contain 2425 For SCCS, VC implements snapshots itself. The files it uses contain
2418name/file/version-number triples. These snapshots are visible only 2426name/file/version-number triples. These snapshots are visible only
2419through VC. 2427through VC.
2420 2428
2429@c ??? What about CVS?
2430
2421 A snapshot is a set of checked-in versions. So make sure that all the 2431 A snapshot is a set of checked-in versions. So make sure that all the
2422files are checked in and not locked when you make a snapshot. 2432files are checked in and not locked when you make a snapshot.
2423 2433
@@ -2472,6 +2482,8 @@ most recent entry in the change log file.
2472 2482
2473This command works with RCS or CVS only, not with SCCS. 2483This command works with RCS or CVS only, not with SCCS.
2474 2484
2485@c ??? What about other back ends?
2486
2475@item C-u C-x v a 2487@item C-u C-x v a
2476As above, but only find entries for the current buffer's file. 2488As above, but only find entries for the current buffer's file.
2477 2489
@@ -2625,6 +2637,8 @@ directly into working files. Certain special strings called
2625@dfn{version headers} are replaced in each successive version by the 2637@dfn{version headers} are replaced in each successive version by the
2626number of that version. 2638number of that version.
2627 2639
2640@c ??? How does this relate to CVS?
2641
2628 If you are using RCS, and version headers are present in your working 2642 If you are using RCS, and version headers are present in your working
2629files, Emacs can use them to determine the current version and the 2643files, Emacs can use them to determine the current version and the
2630locking state of the files. This is more reliable than referring to the 2644locking state of the files. This is more reliable than referring to the
@@ -2657,7 +2671,7 @@ setting the variables @code{vc-@var{backend}-header} where
2657each string in the list is inserted as a separate header on a line of 2671each string in the list is inserted as a separate header on a line of
2658its own. 2672its own.
2659 2673
2660 It is often necessary to use ``superfluous'' backslashes when 2674 It may be necessary to use apparently-superfluous backslashes when
2661writing the strings that you put in this variable. For instance, you 2675writing the strings that you put in this variable. For instance, you
2662might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra 2676might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra
2663backslash prevents the string constant from being interpreted as a 2677backslash prevents the string constant from being interpreted as a
@@ -2899,8 +2913,8 @@ only for repositories from hosts that match the pattern.
2899listing} is a list of all the files in a directory. Emacs provides 2913listing} is a list of all the files in a directory. Emacs provides
2900commands to create and delete directories, and to make directory 2914commands to create and delete directories, and to make directory
2901listings in brief format (file names only) and verbose format (sizes, 2915listings in brief format (file names only) and verbose format (sizes,
2902dates, and authors included). There is also a directory browser called 2916dates, and authors included). Emacs also includes a directory browser
2903Dired; see @ref{Dired}. 2917feature called Dired; see @ref{Dired}.
2904 2918
2905@table @kbd 2919@table @kbd
2906@item C-x C-d @var{dir-or-pattern} @key{RET} 2920@item C-x C-d @var{dir-or-pattern} @key{RET}
@@ -2950,9 +2964,10 @@ default).
2950 2964
2951@vindex directory-free-space-program 2965@vindex directory-free-space-program
2952@vindex directory-free-space-args 2966@vindex directory-free-space-args
2953 Emacs adds information about the amount of free space on the disk 2967 In verbose directory listings, Emacs adds information about the
2954that contains the directory. To do this, it runs the program 2968amount of free space on the disk that contains the directory. To do
2955specified by @code{directory-free-space-program} with arguments 2969this, it runs the program specified by
2970@code{directory-free-space-program} with arguments
2956@code{directory-free-space-args}. 2971@code{directory-free-space-args}.
2957 2972
2958@node Comparing Files 2973@node Comparing Files
@@ -2967,19 +2982,26 @@ running the @code{diff} program, using options taken from the variable
2967@code{diff-switches}. The value of @code{diff-switches} should be a 2982@code{diff-switches}. The value of @code{diff-switches} should be a
2968string; the default is @code{"-c"} to specify a context diff. 2983string; the default is @code{"-c"} to specify a context diff.
2969 2984
2970@findex diff-goto-source
2971 After running @kbd{M-x diff}, you can use @kbd{C-x `} to visit
2972successive changed locations in the two source files, as in
2973Compilation mode (@pxref{Compilation Mode}.) In the @samp{*diff*} buffer,
2974you can move to a particular hunk of changes and type @kbd{C-c C-c}
2975(@code{diff-goto-source}) to visit the corresponding source location.
2976
2977@findex diff-backup 2985@findex diff-backup
2978 The command @kbd{M-x diff-backup} compares a specified file with its most 2986 The command @kbd{M-x diff-backup} compares a specified file with its most
2979recent backup. If you specify the name of a backup file, 2987recent backup. If you specify the name of a backup file,
2980@code{diff-backup} compares it with the source file that it is a backup 2988@code{diff-backup} compares it with the source file that it is a backup
2981of. 2989of.
2982 2990
2991@findex diff-goto-source
2992@findex diff-mode
2993@cindex Diff mode
2994 The @samp{*diff*} buffer uses Diff mode, which enables you to use
2995@kbd{C-x `} to visit successive changed locations in the two source
2996files, as in Compilation mode (@pxref{Compilation Mode}.) You can
2997also move to a particular hunk of changes and type @kbd{C-c C-c}
2998(@code{diff-goto-source}) to visit the corresponding source location.
2999
3000@cindex patches
3001 Differences between versions of files are often distributed as
3002patches, which are the output from the @command{diff} program. You
3003can use Diff mode to operate on a patch by typing @kbd{M-x diff-mode}.
3004
2983@findex compare-windows 3005@findex compare-windows
2984 The command @kbd{M-x compare-windows} compares the text in the 3006 The command @kbd{M-x compare-windows} compares the text in the
2985current window with that in the next window. (For more information 3007current window with that in the next window. (For more information
@@ -2990,10 +3012,10 @@ one character at a time, until it reaches characters that don't match.
2990Then the command exits. 3012Then the command exits.
2991 3013
2992 If point in the two windows is followed by non-matching text when 3014 If point in the two windows is followed by non-matching text when
2993the command starts, it tries heuristically to advance up to matching 3015the command starts, @kbd{M-x compare-windows} tries heuristically to
2994text in the two windows, and then exits. So if you use @kbd{M-x 3016advance up to matching text in the two windows, and then exits. So if
2995compare-windows} repeatedly, each time it either skips one matching 3017you use @kbd{M-x compare-windows} repeatedly, each time it either
2996range or finds the start of another. 3018skips one matching range or finds the start of another.
2997 3019
2998@vindex compare-ignore-case 3020@vindex compare-ignore-case
2999@vindex compare-ignore-whitespace 3021@vindex compare-ignore-whitespace
@@ -3004,16 +3026,6 @@ If the variable @code{compare-ignore-whitespace} is non-@code{nil},
3004@code{compare-windows} normally ignores changes in whitespace, and a 3026@code{compare-windows} normally ignores changes in whitespace, and a
3005prefix argument turns that off. 3027prefix argument turns that off.
3006 3028
3007@findex diff-mode
3008@cindex diffs
3009@cindex patches
3010@cindex Diff mode
3011 Differences between versions of files are often distributed as
3012@dfn{patches}, which are the output from @command{diff} or a version
3013control system that uses @command{diff}. @kbd{M-x diff-mode} turns on
3014Diff mode, a major mode for viewing and editing patches, either as
3015``unified diffs'' or ``context diffs.''
3016
3017@cindex Smerge mode 3029@cindex Smerge mode
3018@findex smerge-mode 3030@findex smerge-mode
3019@cindex failed merges 3031@cindex failed merges
@@ -3154,19 +3166,20 @@ mode called Tar mode which provides a Dired-like list of the contents
3154would in Dired, and visit the subfiles contained in the archive. 3166would in Dired, and visit the subfiles contained in the archive.
3155However, not all Dired commands are available in Tar mode. 3167However, not all Dired commands are available in Tar mode.
3156 3168
3157 If you enable Auto Compression mode (@pxref{Compressed Files}), then 3169 If Auto Compression mode is enabled (@pxref{Compressed Files}), then
3158Tar mode is used also for compressed archives---files with extensions 3170Tar mode is used also for compressed archives---files with extensions
3159@samp{.tgz}, @code{.tar.Z} and @code{.tar.gz}. 3171@samp{.tgz}, @code{.tar.Z} and @code{.tar.gz}.
3160 3172
3161 The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file 3173 The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file
3162into its own buffer. You can edit it there and when you save the buffer 3174into its own buffer. You can edit it there, and if you save the
3163the edited version will replace the version in the Tar buffer. @kbd{v} 3175buffer, the edited version will replace the version in the Tar buffer.
3164extracts a file into a buffer in View mode. @kbd{o} extracts the file 3176@kbd{v} extracts a file into a buffer in View mode. @kbd{o} extracts
3165and displays it in another window, so you could edit the file and 3177the file and displays it in another window, so you could edit the file
3166operate on the archive simultaneously. @kbd{d} marks a file for 3178and operate on the archive simultaneously. @kbd{d} marks a file for
3167deletion when you later use @kbd{x}, and @kbd{u} unmarks a file, as in 3179deletion when you later use @kbd{x}, and @kbd{u} unmarks a file, as in
3168Dired. @kbd{C} copies a file from the archive to disk and @kbd{R} 3180Dired. @kbd{C} copies a file from the archive to disk and @kbd{R}
3169renames a file. @kbd{g} reverts the buffer from the archive on disk. 3181renames a file within the archive. @kbd{g} reverts the buffer from
3182the archive on disk.
3170 3183
3171 The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission 3184 The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission
3172bits, group, and owner, respectively. 3185bits, group, and owner, respectively.
@@ -3282,8 +3295,6 @@ This is achieved using the variable @code{auto-save-file-name-transforms}.
3282 Normally, if you do not specify a user name in a remote file name, 3295 Normally, if you do not specify a user name in a remote file name,
3283that means to use your own user name. But if you set the variable 3296that means to use your own user name. But if you set the variable
3284@code{ange-ftp-default-user} to a string, that string is used instead. 3297@code{ange-ftp-default-user} to a string, that string is used instead.
3285(The Emacs package that implements FTP file access is called
3286@code{ange-ftp}.)
3287 3298
3288@cindex anonymous FTP 3299@cindex anonymous FTP
3289@vindex ange-ftp-generate-anonymous-password 3300@vindex ange-ftp-generate-anonymous-password
@@ -3293,8 +3304,8 @@ are handled specially. The variable
3293@code{ange-ftp-generate-anonymous-password} controls what happens: if 3304@code{ange-ftp-generate-anonymous-password} controls what happens: if
3294the value of this variable is a string, then that string is used as 3305the value of this variable is a string, then that string is used as
3295the password; if non-@code{nil} (the default), then the value of 3306the password; if non-@code{nil} (the default), then the value of
3296@code{user-mail-address} is used; if @code{nil}, the user is prompted 3307@code{user-mail-address} is used; if @code{nil}, then Emacs prompts
3297for a password as normal. 3308you for a password as usual.
3298 3309
3299@cindex firewall, and accessing remote files 3310@cindex firewall, and accessing remote files
3300@cindex gateway, and remote file access with @code{ange-ftp} 3311@cindex gateway, and remote file access with @code{ange-ftp}
@@ -3453,7 +3464,7 @@ This adds a @samp{Filesets} menu to the menu bar.
3453 3464
3454@findex filesets-add-buffer 3465@findex filesets-add-buffer
3455@findex filesets-remove-buffer 3466@findex filesets-remove-buffer
3456 The simplest way to define filesets is by adding files to them one 3467 The simplest way to define a fileset is by adding files to it one
3457at a time. To add a file to fileset @var{name}, visit the file and 3468at a time. To add a file to fileset @var{name}, visit the file and
3458type @kbd{M-x filesets-add-buffer @kbd{RET} @var{name} @kbd{RET}}. If 3469type @kbd{M-x filesets-add-buffer @kbd{RET} @var{name} @kbd{RET}}. If
3459there is no fileset @var{name}, this creates a new one, which 3470there is no fileset @var{name}, this creates a new one, which