* Visiting:: Visiting a file prepares Emacs to edit the file.
* Saving:: Saving makes your changes permanent.
* Reverting:: Reverting cancels all the changes not saved.
+@ifnottex
+* Autorevert:: Auto Reverting non-file buffers.
+@end ifnottex
* Auto Save:: Auto Save periodically protects against loss of data.
* File Aliases:: Handling multiple names for one file.
* Version Control:: Version control systems (RCS, CVS and SCCS).
Control}), the variable @code{vc-make-backup-files} determines whether
to make backup files. By default it is @code{nil}, since backup files
are redundant when you store all the previous versions in a version
-control system. @xref{General VC Options,,,emacs-xtra, Specialized
-Emacs Features}.
+control system.
+@iftex
+@xref{General VC Options,,,emacs-xtra, Specialized Emacs Features}.
+@end iftex
+@ifnottex
+@xref{General VC Options}.
+@end ifnottex
+
At your option, Emacs can keep either a single backup for each file,
or make a series of numbered backup files for each file that you edit.
@xref{VC Mode Line}, for Auto Revert peculiarities in buffers that
visit files under version control.
+@ifnottex
+@include arevert-xtra.texi
+@end ifnottex
+
@node Auto Save
@section Auto-Saving: Protection Against Disasters
@cindex Auto Save mode
VC is enabled by default in Emacs. To disable it, set the
customizable variable @code{vc-handled-backends} to @code{nil}
+@iftex
(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Customizing VC}).
+@end ifnottex
+
@menu
* Introduction to VC:: How version control works in general.
* Old Versions:: Examining and comparing old versions.
* Secondary VC Commands:: The commands used a little less frequently.
* Branches:: Multiple lines of development.
+@ifnottex
+* Remote Repositories:: Efficient access to remote CVS servers.
+* Snapshots:: Sets of file versions treated as a unit.
+* Miscellaneous VC:: Various other commands and features of VC.
+* Customizing VC:: Variables that change VC's behavior.
+@end ifnottex
@end menu
@node Introduction to VC
CVS normally allows each user to modify his own copy of the work file
at any time, but requires merging with changes from other users at
check-in time. However, CVS can also be set up to require locking.
+@iftex
(@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{CVS Options}).
+@end ifnottex
+
@node Types of Log File
@subsubsection Types of Log File
the entry in @file{ChangeLog}, then copy it to the log buffer when you
check in the change. Or you can write the entry in the log buffer
while checking in the change, and later use the @kbd{C-x v a} command
-to copy it to @file{ChangeLog} (@pxref{Change Logs and
-VC,,,emacs-xtra, Specialized Emacs Features}).
+to copy it to @file{ChangeLog}
+@iftex
+(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Change Logs and VC}).
+@end ifnottex
+
@node VC Mode Line
@subsection Version Control and the Mode Line
@cindex specific version control system
Instead of the version number, you can also specify the name of a
version control system. This is useful when one file is being managed
-with two version control systems at the same time (@pxref{Local
-Version Control,,,emacs-xtra, Specialized Emacs Features}).
+with two version control systems at the same time
+@iftex
+(@pxref{Local Version Control,,,emacs-xtra, Specialized Emacs
+Features}).
+@end iftex
+@ifnottex
+(@pxref{Local Version Control}).
+@end ifnottex
+
@end itemize
@node Log Buffer
entries for the file(s) concerned in the top entry in the ChangeLog
and uses those paragraphs as the log text. This text is only inserted
if the top entry was made under your user name on the current date.
+@iftex
@xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features},
+@end iftex
+@ifnottex
+@xref{Change Logs and VC},
+@end ifnottex
for the opposite way of working---generating ChangeLog entries from
the revision control log.
In the @samp{*VC-Log*} buffer, @kbd{C-c C-f} (@kbd{M-x
log-edit-show-files}) shows the list of files to be committed in case
you need to check that. (This can be a list of more than one file if
-you use VC Dired mode or PCL-CVS. @xref{VC Dired Mode,,,emacs-xtra,
-Specialized Emacs Features}, and @ref{Top, , About PCL-CVS, pcl-cvs,
-PCL-CVS --- The Emacs Front-End to CVS}.)
+you use VC Dired mode or PCL-CVS.
+@iftex
+@xref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features},
+@end iftex
+@ifnottex
+@xref{VC Dired Mode},
+@end ifnottex
+and @ref{Top, , About PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs
+Front-End to CVS}.)
When you have finished editing the log message, type @kbd{C-c C-c} to
exit the buffer and commit the change.
You can specify a checked-in version by its number; an empty input
specifies the current contents of the work file (which may be different
from all the checked-in versions). You can also specify a snapshot name
-(@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features}) instead of one or both version numbers.
+@iftex
+(@pxref{Snapshots,,,emacs-xtra, Specialized Emacs Features})
+@end iftex
+@ifnottex
+(@pxref{Snapshots})
+@end ifnottex
+instead of one or both version numbers.
If you supply a directory name instead of the name of a registered
file, this command compares the two specified versions of all registered
* Registering:: Putting a file under version control.
* VC Status:: Viewing the VC status of files.
* VC Undo:: Canceling changes before or after check-in.
+@ifnottex
+* VC Dired Mode:: Listing files managed by version control.
+* VC Dired Commands:: Commands to use in a VC Dired buffer.
+@end ifnottex
@end menu
@node Registering
registered in a version control system, Emacs uses that system. If
there is more than one system in use for a directory, Emacs uses the
one that appears first in @code{vc-handled-backends}
-(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}). On
-the other hand, if there are no files already registered, Emacs uses
+@iftex
+(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Customizing VC}).
+@end ifnottex
+On the other hand, if there are no files already registered, Emacs uses
the first system from @code{vc-handled-backends} that could register
the file (for example, you cannot register a file under CVS if its
directory is not already part of a CVS tree); with the default value
@item P
Move to the log of the previous file, when the logs of multiple files
-are in the log buffer (@pxref{VC Dired Mode,,,emacs-xtra, Specialized
-Emacs Features}). Otherwise, just move to the beginning of the log. A
-numeric prefix argument is a repeat count, so @kbd{C-u 10 P} would
-move backward 10 files.
+are in the log buffer
+@iftex
+(@pxref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{VC Dired Mode}).
+@end ifnottex
+Otherwise, just move to the beginning of the log. A numeric prefix
+argument is a repeat count, so @kbd{C-u 10 P} would move backward 10
+files.
@item N
Move to the log of the next file, when the logs of multiple files are
-in the log buffer (@pxref{VC Dired Mode,,,emacs-xtra, Specialized
-Emacs Features}). It also takes a numeric prefix argument as a repeat
-count.
+in the log buffer
+@iftex
+(@pxref{VC Dired Mode,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{VC Dired Mode}).
+@end ifnottex
+It also takes a numeric prefix argument as a repeat count.
@item f
Visit the revision indicated at the current line, like typing @kbd{C-x
erroneous check-in, fix the error, and check the file in again.
When @kbd{C-x v c} does not revert the buffer, it unexpands all
-version control headers in the buffer instead (@pxref{Version
-Headers,,,emacs-xtra, Specialized Emacs Features}). This is because
-the buffer no longer corresponds to any existing version. If you
-check it in again, the check-in process will expand the headers
-properly for the new version number.
+version control headers in the buffer instead
+@iftex
+(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Version Headers}).
+@end ifnottex
+This is because the buffer no longer corresponds to any existing
+version. If you check it in again, the check-in process will expand
+the headers properly for the new version number.
However, it is impossible to unexpand the RCS @samp{@w{$}Log$} header
automatically. If you use that header feature, you have to unexpand it
under CVS, because canceling versions is very dangerous and discouraged
with CVS.
+@ifnottex
+@c vc1-xtra.texi needs extra level of lowering.
+@lowersections
+@include vc1-xtra.texi
+@raisesections
+@end ifnottex
+
@node Branches
@subsection Multiple Branches of a File
@cindex branch (version control)
records.
This technique works reliably and automatically, provided that the
-source files contain RCS version headers (@pxref{Version
-Headers,,,emacs-xtra, Specialized Emacs Features}). The headers enable
-Emacs to be sure, at all times, which version number is present in the
-work file.
+source files contain RCS version headers
+@iftex
+(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}).
+@end iftex
+@ifnottex
+(@pxref{Version Headers}).
+@end ifnottex
+The headers enable Emacs to be sure, at all times, which version
+number is present in the work file.
If the files do not have version headers, you must instead tell Emacs
explicitly in each session which branch you are working on. To do this,
branch number. This ensures that Emacs knows which branch it is using
during this particular editing session.
+@ifnottex
+@include vc2-xtra.texi
+@end ifnottex
+
@node Directories
@section File Directories
mode provides commands to resolve conflicts by selecting specific
changes.
- @inforef{Emerge,, emacs-xtra} for the Emerge facility, which
-provides a powerful interface for merging files.
+@iftex
+@xref{Emerge,,, emacs-xtra},
+@end iftex
+@ifnottex
+@xref{Emerge},
+@end ifnottex
+for the Emerge facility, which provides a powerful interface for
+merging files.
@node Diff Mode
@section Diff Mode