/[emacs]/emacs/man/files.texi
ViewVC logotype

Diff of /emacs/man/files.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.70 by gm, Sat Apr 20 22:56:08 2002 UTC revision 1.70.2.1 by miles, Fri Apr 4 06:20:47 2003 UTC
# Line 104  first slash in the double slash; the res Line 104  first slash in the double slash; the res
104  @cindex environment variables in file names  @cindex environment variables in file names
105  @cindex expansion of environment variables  @cindex expansion of environment variables
106  @cindex @code{$} in file names  @cindex @code{$} in file names
107  @anchor{File Names with $}    @anchor{File Names with $}@samp{$} in a file name is used to
108    @samp{$} in a file name is used to substitute environment variables.  substitute an environment variable.  The environment variable name
109  For example, if you have used the shell command @command{export  consists of all the alphanumeric characters after the @samp{$};
110    alternatively, it can be enclosed in braces after the @samp{$}.  For
111    example, if you have used the shell command @command{export
112  FOO=rms/hacks} to set up an environment variable named @env{FOO}, then  FOO=rms/hacks} to set up an environment variable named @env{FOO}, then
113  you can use @file{/u/$FOO/test.c} or @file{/u/$@{FOO@}/test.c} as an  you can use @file{/u/$FOO/test.c} or @file{/u/$@{FOO@}/test.c} as an
114  abbreviation for @file{/u/rms/hacks/test.c}.  The environment variable  abbreviation for @file{/u/rms/hacks/test.c}.  If the environment
115  name consists of all the alphanumeric characters after the @samp{$};  variable is not defined, no substitution occurs: @file{/u/$notdefined}
116  alternatively, it may be enclosed in braces after the @samp{$}.  Note  stands for itself (assuming the environment variable @env{notdefined}
117  that shell commands to set environment variables affect Emacs only if  is not defined).
118  done before Emacs is started.  
119      Note that shell commands to set environment variables affect Emacs
120    only when done before Emacs is started.
121    
122  @cindex home directory shorthand  @cindex home directory shorthand
123    You can use the @file{~/} in a file name to mean your home directory,    You can use the @file{~/} in a file name to mean your home directory,
# Line 123  doesn't have a home directory, Emacs sub Line 127  doesn't have a home directory, Emacs sub
127  value of the environment variable @code{HOME}; see @ref{General  value of the environment variable @code{HOME}; see @ref{General
128  Variables}.)  Variables}.)
129    
130    To access a file with @samp{$} in its name, type @samp{$$}.  This pair    To access a file with @samp{$} in its name, if the @samp{$} causes
131  is converted to a single @samp{$} at the same time as variable  expansion, type @samp{$$}.  This pair is converted to a single
132  substitution is performed for a single @samp{$}.  Alternatively, quote the  @samp{$} at the same time as variable substitution is performed for a
133  whole file name with @samp{/:} (@pxref{Quoted File Names}).  File names  single @samp{$}.  Alternatively, quote the whole file name with
134  which begin with a literal @samp{~} should also be quoted with @samp{/:}.  @samp{/:} (@pxref{Quoted File Names}).  File names which begin with a
135    literal @samp{~} should also be quoted with @samp{/:}.
136    
137  @findex substitute-in-file-name  @findex substitute-in-file-name
138    The Lisp function that performs the substitution is called    The Lisp function that performs the substitution is called
# Line 268  characters.  You can disable the wildcar Line 273  characters.  You can disable the wildcar
273  @code{find-file-wildcards}.  @code{find-file-wildcards}.
274    
275    If you visit a file that the operating system won't let you modify,    If you visit a file that the operating system won't let you modify,
276  Emacs makes the buffer read-only, so that you won't go ahead and make  or that is marked read-only, Emacs makes the buffer read-only too, so
277  changes that you'll have trouble saving afterward.  You can make the  that you won't go ahead and make changes that you'll have trouble
278  buffer writable with @kbd{C-x C-q} (@code{vc-toggle-read-only}).  saving afterward.  You can make the buffer writable with @kbd{C-x C-q}
279  @xref{Misc Buffer}.  (@code{toggle-read-only}).  @xref{Misc Buffer}.
280    
281  @kindex C-x C-r  @kindex C-x C-r
282  @findex find-file-read-only  @findex find-file-read-only
283    Occasionally you might want to visit a file as read-only in order to    If you want to visit a file as read-only in order to protect
284  protect yourself from entering changes accidentally; do so by visiting  yourself from entering changes accidentally, visit it with the command
285  the file with the command @kbd{C-x C-r} (@code{find-file-read-only}).  @kbd{C-x C-r} (@code{find-file-read-only}) instead of @kbd{C-x C-f}.
286    
287  @kindex C-x C-v  @kindex C-x C-v
288  @findex find-alternate-file  @findex find-alternate-file
# Line 320  does not add a final newline because of Line 325  does not add a final newline because of
325  If you already have visited the same file in the usual (non-literal)  If you already have visited the same file in the usual (non-literal)
326  manner, this command asks you whether to visit it literally instead.  manner, this command asks you whether to visit it literally instead.
327    
328  @vindex find-file-hooks  @vindex find-file-hook
329  @vindex find-file-not-found-hooks  @vindex find-file-not-found-functions
330    Two special hook variables allow extensions to modify the operation of    Two special hook variables allow extensions to modify the operation of
331  visiting files.  Visiting a file that does not exist runs the functions  visiting files.  Visiting a file that does not exist runs the functions
332  in the list @code{find-file-not-found-hooks}; this variable holds a list  in the list @code{find-file-not-found-functions}; this variable holds a list
333  of functions, and the functions are called one by one (with no  of functions, and the functions are called one by one (with no
334  arguments) until one of them returns non-@code{nil}.  This is not a  arguments) until one of them returns non-@code{nil}.  This is not a
335  normal hook, and the name ends in @samp{-hooks} rather than @samp{-hook}  normal hook, and the name ends in @samp{-functions} rather than @samp{-hook}
336  to indicate that fact.  to indicate that fact.
337    
338    Successful visiting of any file, whether existing or not, calls the    Successful visiting of any file, whether existing or not, calls the
339  functions in the list @code{find-file-hooks}, with no arguments.  functions in the list @code{find-file-hook}, with no arguments.
340  This variable is really a normal hook, but it has an abnormal name for  This variable is a normal hook.  In the case of a nonexistent file, the
341  historical compatibility.  In the case of a nonexistent file, the  @code{find-file-not-found-functions} are run first.  @xref{Hooks}.
 @code{find-file-not-found-hooks} are run first.  @xref{Hooks}.  
342    
343    There are several ways to specify automatically the major mode for    There are several ways to specify automatically the major mode for
344  editing the file (@pxref{Choosing Modes}), and to specify local  editing the file (@pxref{Choosing Modes}), and to specify local
# Line 828  Time-stamp: <> Line 832  Time-stamp: <>
832  or like this:  or like this:
833    
834  @example  @example
835  Time-stamp: ""  Time-stamp: " "
836  @end example  @end example
837    
838    Then add the hook function @code{time-stamp} to the hook    Then add the hook function @code{time-stamp} to the hook
839  @code{write-file-hooks}; that hook function will automatically update  @code{write-file-functions}; that hook function will automatically update
840  the time stamp, inserting the current date and time when you save the  the time stamp, inserting the current date and time when you save the
841  file.  You can also use the command @kbd{M-x time-stamp} to update the  file.  You can also use the command @kbd{M-x time-stamp} to update the
842  time stamp manually.  For other customizations, see the Custom group  time stamp manually.  For other customizations, see the Custom group
# Line 946  in a buffer is calculated when auto-savi Line 950  in a buffer is calculated when auto-savi
950    
951  @cindex auto-save for remote files  @cindex auto-save for remote files
952  @vindex auto-save-file-name-transforms  @vindex auto-save-file-name-transforms
953  The variable @code{auto-save-file-name-transforms} allows a    The variable @code{auto-save-file-name-transforms} allows a degree
954  degree of control over the auto-save file name.  The default value is  of control over the auto-save file name.  It lets you specify a series
955  set up to put the auto-save files for remote files  of regular expressions and replacements to transform the auto save
956  (@pxref{Remote Files}) into the temporary file directory on the local  file name.  The default value puts the auto-save files for remote
957  machine.  files (@pxref{Remote Files}) into the temporary file directory on the
958    local machine.
959    
960    When you delete a substantial part of the text in a large buffer, auto    When you delete a substantial part of the text in a large buffer, auto
961  save turns off temporarily in that buffer.  This is because if you  save turns off temporarily in that buffer.  This is because if you
# Line 1078  links point to directories. Line 1083  links point to directories.
1083    If you visit two names for the same file, normally Emacs makes    If you visit two names for the same file, normally Emacs makes
1084  two different buffers, but it warns you about the situation.  two different buffers, but it warns you about the situation.
1085    
1086  @vindex find-file-existing-other-name  @vindex find-file-existing-other-name
1087  @vindex find-file-suppress-same-file-warnings  @vindex find-file-suppress-same-file-warnings
1088    Normally, if you visit a file which Emacs is already visiting under    Normally, if you visit a file which Emacs is already visiting under
1089  a different name, Emacs displays a message in the echo area and uses  a different name, Emacs displays a message in the echo area and uses
# Line 1107  implies the effect of @code{find-file-ex Line 1112  implies the effect of @code{find-file-ex
1112    @dfn{Version control systems} are packages that can record multiple    @dfn{Version control systems} are packages that can record multiple
1113  versions of a source file, usually storing the unchanged parts of the  versions of a source file, usually storing the unchanged parts of the
1114  file just once.  Version control systems also record history information  file just once.  Version control systems also record history information
1115  such as the creation time of each version, who created it, and a  such as the creation time of each version, who created it, and a
1116  description of what was changed in that version.  description of what was changed in that version.
1117    
1118    The Emacs version control interface is called VC.  Its commands work    The Emacs version control interface is called VC.  Its commands work
# Line 1234  check-in time.  However, CVS can also be Line 1239  check-in time.  However, CVS can also be
1239  @node Types of Log File  @node Types of Log File
1240  @subsubsection Types of Log File  @subsubsection Types of Log File
1241  @cindex types of log file  @cindex types of log file
1242  @cindex log File, types of  @cindex log File, types of
1243  @cindex version control log  @cindex version control log
1244    
1245  GNU projects under a revision control system generally possess  GNU projects under a revision control system generally possess
# Line 1280  instance, @samp{jim}), that is displayed Line 1285  instance, @samp{jim}), that is displayed
1285  either locking or check-in, depending on the situation.  either locking or check-in, depending on the situation.
1286    
1287  @table @kbd  @table @kbd
 @item C-x C-q  
1288  @itemx C-x v v  @itemx C-x v v
1289  Perform the next logical version control operation on this file.  Perform the next logical version control operation on this file.
1290  @end table  @end table
1291    
1292  @findex vc-next-action  @findex vc-next-action
 @findex vc-toggle-read-only  
1293  @kindex C-x v v  @kindex C-x v v
 @kindex C-x C-q @r{(Version Control)}  
   Strictly speaking, the command for this job is @code{vc-next-action},  
 bound to @kbd{C-x v v}.  However, the normal meaning of @kbd{C-x C-q} is  
 to make a read-only buffer writable, or vice versa; we have extended it  
 to do the same job properly for files managed by version control, by  
 performing the appropriate version control operations.  When you type  
 @kbd{C-x C-q} on a registered file, it acts like @kbd{C-x v v}.  
   
1294    The precise action of this command depends on the state of the file,    The precise action of this command depends on the state of the file,
1295  and whether the version control system uses locking or not.  SCCS and  and whether the version control system uses locking or not.  SCCS and
1296  RCS normally use locking; CVS normally does not use locking.  RCS normally use locking; CVS normally does not use locking.
1297    
1298    @findex vc-toggle-read-only
1299    @kindex C-x C-q @r{(Version Control)}
1300      As a special convenience that is particularly useful for files with
1301    locking, you can let Emacs check a file in or out whenever you change
1302    its read-only flag.  This means, for example, that you cannot
1303    accidentally edit a file without properly checking it out first.  To
1304    achieve this, bind the key @kbd{C-x C-q} to @kbd{vc-toggle-read-only}
1305    in your @file{~/.emacs} file.  (@xref{Init Rebinding}.)
1306    
1307  @menu  @menu
1308  * VC with Locking::     RCS in its default mode, SCCS, and optionally CVS.  * VC with Locking::     RCS in its default mode, SCCS, and optionally CVS.
1309  * Without Locking::     Without locking: default mode for CVS.  * Without Locking::     Without locking: default mode for CVS.
1310  * Advanced C-x C-q::    Advanced features available with a prefix argument.  * Advanced C-x v v::    Advanced features available with a prefix argument.
1311  * Log Buffer::          Features available in log entry buffers.  * Log Buffer::          Features available in log entry buffers.
1312  @end menu  @end menu
1313                  
1314  @node VC with Locking                  @node VC with Locking
1315  @subsubsection Basic Version Control with Locking  @subsubsection Basic Version Control with Locking
1316    
1317    If locking is used for the file (as with SCCS, and RCS in its default    If locking is used for the file (as with SCCS, and RCS in its default
1318  mode), @kbd{C-x C-q} can either lock a file or check it in:  mode), @kbd{C-x v v} can either lock a file or check it in:
1319    
1320  @itemize @bullet  @itemize @bullet
1321  @item  @item
1322  If the file is not locked, @kbd{C-x C-q} locks it, and  If the file is not locked, @kbd{C-x v v} locks it, and
1323  makes it writable so that you can change it.  makes it writable so that you can change it.
1324    
1325  @item  @item
1326  If the file is locked by you, and contains changes, @kbd{C-x C-q} checks  If the file is locked by you, and contains changes, @kbd{C-x v v} checks
1327  in the changes.  In order to do this, it first reads the log entry  in the changes.  In order to do this, it first reads the log entry
1328  for the new version.  @xref{Log Buffer}.  for the new version.  @xref{Log Buffer}.
1329    
1330  @item  @item
1331  If the file is locked by you, but you have not changed it since you  If the file is locked by you, but you have not changed it since you
1332  locked it, @kbd{C-x C-q} releases the lock and makes the file read-only  locked it, @kbd{C-x v v} releases the lock and makes the file read-only
1333  again.  again.
1334    
1335  @item  @item
1336  If the file is locked by some other user, @kbd{C-x C-q} asks you whether  If the file is locked by some other user, @kbd{C-x v v} asks you whether
1337  you want to ``steal the lock'' from that user.  If you say yes, the file  you want to ``steal the lock'' from that user.  If you say yes, the file
1338  becomes locked by you, but a message is sent to the person who had  becomes locked by you, but a message is sent to the person who had
1339  formerly locked the file, to inform him of what has happened.  formerly locked the file, to inform him of what has happened.
# Line 1347  file.  The status indicator on the mode Line 1351  file.  The status indicator on the mode
1351  unmodified; it flips to @samp{:} as soon as you save any changes in the  unmodified; it flips to @samp{:} as soon as you save any changes in the
1352  work file.  work file.
1353    
1354    Here is what @kbd{C-x C-q} does when using CVS:    Here is what @kbd{C-x v v} does when using CVS:
1355    
1356  @itemize @bullet  @itemize @bullet
1357  @item  @item
# Line 1360  to commit your own changes, type @kbd{C- Line 1364  to commit your own changes, type @kbd{C-
1364    
1365  @item  @item
1366  If there are no new changes in the master file, but you have made  If there are no new changes in the master file, but you have made
1367  modifications in your work file, @kbd{C-x C-q} checks in your changes.  modifications in your work file, @kbd{C-x v v} checks in your changes.
1368  In order to do this, it first reads the log entry for the new version.  In order to do this, it first reads the log entry for the new version.
1369  @xref{Log Buffer}.  @xref{Log Buffer}.
1370    
1371  @item  @item
1372  If the file is not modified, the @kbd{C-x C-q} does nothing.  If the file is not modified, the @kbd{C-x v v} does nothing.
1373  @end itemize  @end itemize
1374    
1375    These rules also apply when you use RCS in the mode that does not    These rules also apply when you use RCS in the mode that does not
# Line 1380  changes.  We hope to eliminate this risk Line 1384  changes.  We hope to eliminate this risk
1384  with RCS in a future Emacs version.  with RCS in a future Emacs version.
1385    
1386    In addition, locking is possible with RCS even in this mode, although    In addition, locking is possible with RCS even in this mode, although
1387  it is not required; @kbd{C-x C-q} with an unmodified file locks the  it is not required; @kbd{C-x v v} with an unmodified file locks the
1388  file, just as it does with RCS in its normal (locking) mode.  file, just as it does with RCS in its normal (locking) mode.
1389    
1390  @node Advanced C-x C-q  @node Advanced C-x v v
1391  @subsubsection Advanced Control in @kbd{C-x C-q}  @subsubsection Advanced Control in @kbd{C-x v v}
1392    
1393  @cindex version number to check in/out  @cindex version number to check in/out
1394    When you give a prefix argument to @code{vc-next-action} (@kbd{C-u    When you give a prefix argument to @code{vc-next-action} (@kbd{C-u
1395  C-x C-q}), it still performs the next logical version control  C-x v v}), it still performs the next logical version control
1396  operation, but accepts additional arguments to specify precisely how  operation, but accepts additional arguments to specify precisely how
1397  to do the operation.  to do the operation.
1398    
# Line 1403  If the file is not modified (and unlocke Line 1407  If the file is not modified (and unlocke
1407  version to select; this lets you start working from an older version,  version to select; this lets you start working from an older version,
1408  or on another branch.  If you do not enter any version, that takes you  or on another branch.  If you do not enter any version, that takes you
1409  to the highest version on the current branch; therefore @kbd{C-u C-x  to the highest version on the current branch; therefore @kbd{C-u C-x
1410  C-q @key{RET}} is a convenient way to get the latest version of a file from  v v @key{RET}} is a convenient way to get the latest version of a file from
1411  the repository.  the repository.
1412    
1413  @item  @item
# Line 1417  Version Control}). Line 1421  Version Control}).
1421  @node Log Buffer  @node Log Buffer
1422  @subsubsection Features of the Log Entry Buffer  @subsubsection Features of the Log Entry Buffer
1423    
1424    When you check in changes, @kbd{C-x C-q} first reads a log entry.  It    When you check in changes, @kbd{C-x v v} first reads a log entry.  It
1425  pops up a buffer called @samp{*VC-Log*} for you to enter the log entry.  pops up a buffer called @samp{*VC-Log*} for you to enter the log entry.
1426  When you are finished, type @kbd{C-c C-c} in the @samp{*VC-Log*} buffer.  When you are finished, type @kbd{C-c C-c} in the @samp{*VC-Log*} buffer.
1427  That is when check-in really happens.  That is when check-in really happens.
# Line 1536  use once a day. Line 1540  use once a day.
1540  * Registering::         Putting a file under version control.  * Registering::         Putting a file under version control.
1541  * VC Status::           Viewing the VC status of files.  * VC Status::           Viewing the VC status of files.
1542  * VC Undo::             Cancelling changes before or after check-in.  * VC Undo::             Cancelling changes before or after check-in.
1543  * VC Dired Mode::       Listing files managed by version control.  * VC Dired Mode::       Listing files managed by version control.
1544  * VC Dired Commands::   Commands to use in a VC Dired buffer.  * VC Dired Commands::   Commands to use in a VC Dired buffer.
1545  @end menu  @end menu
1546    
# Line 1569  there are any files under CVS, SCCS if a Line 1573  there are any files under CVS, SCCS if a
1573  RCS as the ultimate default.  RCS as the ultimate default.
1574    
1575    If locking is in use, @kbd{C-x v i} leaves the file unlocked and    If locking is in use, @kbd{C-x v i} leaves the file unlocked and
1576  read-only.  Type @kbd{C-x C-q} if you wish to start editing it.  After  read-only.  Type @kbd{C-x v v} if you wish to start editing it.  After
1577  registering a file with CVS, you must subsequently commit the initial  registering a file with CVS, you must subsequently commit the initial
1578  version by typing @kbd{C-x C-q}.  version by typing @kbd{C-x v v}.
1579    
1580  @vindex vc-default-init-version  @vindex vc-default-init-version
1581  @cindex initial version number to register  @cindex initial version number to register
# Line 1803  example above have branch numbers 1.2.1 Line 1807  example above have branch numbers 1.2.1
1807  * Switching Branches::    How to get to another existing branch.  * Switching Branches::    How to get to another existing branch.
1808  * Creating Branches::     How to start a new branch.  * Creating Branches::     How to start a new branch.
1809  * Merging::               Transferring changes between branches.  * Merging::               Transferring changes between branches.
1810  * Multi-User Branching::  Multiple users working at multiple branches  * Multi-User Branching::  Multiple users working at multiple branches
1811                              in parallel.                              in parallel.
1812  @end menu  @end menu
1813    
1814  @node Switching Branches  @node Switching Branches
1815  @subsubsection Switching between Branches  @subsubsection Switching between Branches
1816    
1817    To switch between branches, type @kbd{C-u C-x C-q} and specify the    To switch between branches, type @kbd{C-u C-x v v} and specify the
1818  version number you want to select.  This version is then visited  version number you want to select.  This version is then visited
1819  @emph{unlocked} (write-protected), so you can examine it before locking  @emph{unlocked} (write-protected), so you can examine it before locking
1820  it.  Switching branches in this way is allowed only when the file is not  it.  Switching branches in this way is allowed only when the file is not
# Line 1829  other branch. Line 1833  other branch.
1833    
1834    To create a new branch from a head version (one that is the latest in    To create a new branch from a head version (one that is the latest in
1835  the branch that contains it), first select that version if necessary,  the branch that contains it), first select that version if necessary,
1836  lock it with @kbd{C-x C-q}, and make whatever changes you want.  Then,  lock it with @kbd{C-x v v}, and make whatever changes you want.  Then,
1837  when you check in the changes, use @kbd{C-u C-x C-q}.  This lets you  when you check in the changes, use @kbd{C-u C-x v v}.  This lets you
1838  specify the version number for the new version.  You should specify a  specify the version number for the new version.  You should specify a
1839  suitable branch number for a branch starting at the current version.  suitable branch number for a branch starting at the current version.
1840  For example, if the current version is 2.5, the branch number should be  For example, if the current version is 2.5, the branch number should be
# Line 1839  that point. Line 1843  that point.
1843    
1844    To create a new branch at an older version (one that is no longer the    To create a new branch at an older version (one that is no longer the
1845  head of a branch), first select that version (@pxref{Switching  head of a branch), first select that version (@pxref{Switching
1846  Branches}), then lock it with @kbd{C-x C-q}.  You'll be asked to  Branches}), then lock it with @kbd{C-x v v}.  You'll be asked to
1847  confirm, when you lock the old version, that you really mean to create a  confirm, when you lock the old version, that you really mean to create a
1848  new branch---if you say no, you'll be offered a chance to lock the  new branch---if you say no, you'll be offered a chance to lock the
1849  latest version instead.  latest version instead.
1850    
1851    Then make your changes and type @kbd{C-x C-q} again to check in a new    Then make your changes and type @kbd{C-x v v} again to check in a new
1852  version.  This automatically creates a new branch starting from the  version.  This automatically creates a new branch starting from the
1853  selected version.  You need not specially request a new branch, because  selected version.  You need not specially request a new branch, because
1854  that's the only way to add a new version at a point that is not the head  that's the only way to add a new version at a point that is not the head
# Line 1853  of a branch. Line 1857  of a branch.
1857    After the branch is created, you ``stay'' on it.  That means that    After the branch is created, you ``stay'' on it.  That means that
1858  subsequent check-ins create new versions on that branch.  To leave the  subsequent check-ins create new versions on that branch.  To leave the
1859  branch, you must explicitly select a different version with @kbd{C-u C-x  branch, you must explicitly select a different version with @kbd{C-u C-x
1860  C-q}.  To transfer changes from one branch to another, use the merge  v v}.  To transfer changes from one branch to another, use the merge
1861  command, described in the next section.  command, described in the next section.
1862    
1863  @node Merging  @node Merging
# Line 1890  merges them into the current version of Line 1894  merges them into the current version of
1894    As an example, suppose that you have finished a certain feature on    As an example, suppose that you have finished a certain feature on
1895  branch 1.3.1.  In the meantime, development on the trunk has proceeded  branch 1.3.1.  In the meantime, development on the trunk has proceeded
1896  to version 1.5.  To merge the changes from the branch to the trunk,  to version 1.5.  To merge the changes from the branch to the trunk,
1897  first go to the head version of the trunk, by typing @kbd{C-u C-x C-q  first go to the head version of the trunk, by typing @kbd{C-u C-x v v
1898  @key{RET}}.  Version 1.5 is now current.  If locking is used for the file,  @key{RET}}.  Version 1.5 is now current.  If locking is used for the file,
1899  type @kbd{C-x C-q} to lock version 1.5 so that you can change it.  Next,  type @kbd{C-x v v} to lock version 1.5 so that you can change it.  Next,
1900  type @kbd{C-x v m 1.3.1 @key{RET}}.  This takes the entire set of changes on  type @kbd{C-x v m 1.3.1 @key{RET}}.  This takes the entire set of changes on
1901  branch 1.3.1 (relative to version 1.3, where the branch started, up to  branch 1.3.1 (relative to version 1.3, where the branch started, up to
1902  the last version on the branch) and merges it into the current version  the last version on the branch) and merges it into the current version
# Line 1956  present in the work file. Line 1960  present in the work file.
1960    
1961    If the files do not have version headers, you must instead tell Emacs    If the files do not have version headers, you must instead tell Emacs
1962  explicitly in each session which branch you are working on.  To do this,  explicitly in each session which branch you are working on.  To do this,
1963  first find the file, then type @kbd{C-u C-x C-q} and specify the correct  first find the file, then type @kbd{C-u C-x v v} and specify the correct
1964  branch number.  This ensures that Emacs knows which branch it is using  branch number.  This ensures that Emacs knows which branch it is using
1965  during this particular editing session.  during this particular editing session.
1966    
# Line 2221  won't really work as retrieved. Line 2225  won't really work as retrieved.
2225    
2226  @menu  @menu
2227  * Change Logs and VC::  Generating a change log file from log entries.  * Change Logs and VC::  Generating a change log file from log entries.
2228  * Renaming and VC::     A command to rename both the source and master  * Renaming and VC::     A command to rename both the source and master
2229                            file correctly.                            file correctly.
2230  * Version Headers::     Inserting version control headers into working files.  * Version Headers::     Inserting version control headers into working files.
2231  @end menu  @end menu
# Line 2514  for files that use version control, set Line 2518  for files that use version control, set
2518  @vindex vc-keep-workfiles  @vindex vc-keep-workfiles
2519    Normally the work file exists all the time, whether it is locked or    Normally the work file exists all the time, whether it is locked or
2520  not.  If you set @code{vc-keep-workfiles} to @code{nil}, then checking  not.  If you set @code{vc-keep-workfiles} to @code{nil}, then checking
2521  in a new version with @kbd{C-x C-q} deletes the work file; but any  in a new version with @kbd{C-x v v} deletes the work file; but any
2522  attempt to visit the file with Emacs creates it again.  (With CVS, work  attempt to visit the file with Emacs creates it again.  (With CVS, work
2523  files are always kept.)  files are always kept.)
2524    
# Line 2534  this in the echo area.  If the value is Line 2538  this in the echo area.  If the value is
2538  asks you each time whether to follow the link.  asks you each time whether to follow the link.
2539    
2540  @vindex vc-suppress-confirm  @vindex vc-suppress-confirm
2541    If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x C-q}    If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v}
2542  and @kbd{C-x v i} can save the current buffer without asking, and  and @kbd{C-x v i} can save the current buffer without asking, and
2543  @kbd{C-x v u} also operates without asking for confirmation.  (This  @kbd{C-x v u} also operates without asking for confirmation.  (This
2544  variable does not affect @kbd{C-x v c}; that operation is so drastic  variable does not affect @kbd{C-x v c}; that operation is so drastic
# Line 2610  locking. Line 2614  locking.
2614    For one thing, you can set the @env{CVSREAD} environment variable    For one thing, you can set the @env{CVSREAD} environment variable
2615  (the value you use makes no difference).  If this variable is defined,  (the value you use makes no difference).  If this variable is defined,
2616  CVS makes your work files read-only by default.  In Emacs, you must  CVS makes your work files read-only by default.  In Emacs, you must
2617  type @kbd{C-x C-q} to make the file writable, so that editing works  type @kbd{C-x v v} to make the file writable, so that editing works
2618  in fact similar as if locking was used.  Note however, that no actual  in fact similar as if locking was used.  Note however, that no actual
2619  locking is performed, so several users can make their files writable  locking is performed, so several users can make their files writable
2620  at the same time.  When setting @env{CVSREAD} for the first time, make  at the same time.  When setting @env{CVSREAD} for the first time, make
# Line 2621  are set correctly. Line 2625  are set correctly.
2625  @cindex watching files (CVS)  @cindex watching files (CVS)
2626    Another way to achieve something similar to locking is to use the    Another way to achieve something similar to locking is to use the
2627  @dfn{watch} feature of CVS.  If a file is being watched, CVS makes it  @dfn{watch} feature of CVS.  If a file is being watched, CVS makes it
2628  read-only by default, and you must also use @kbd{C-x C-q} in Emacs to  read-only by default, and you must also use @kbd{C-x v v} in Emacs to
2629  make it writable.  VC calls @code{cvs edit} to make the file writable,  make it writable.  VC calls @code{cvs edit} to make the file writable,
2630  and CVS takes care to notify other developers of the fact that you  and CVS takes care to notify other developers of the fact that you
2631  intend to change the file.  See the CVS documentation for details on  intend to change the file.  See the CVS documentation for details on
# Line 2640  notified of it until you actually try to Line 2644  notified of it until you actually try to
2644  pick up any recent changes from the repository first, using @kbd{C-x v m  pick up any recent changes from the repository first, using @kbd{C-x v m
2645  @key{RET}}, @pxref{Merging}).  @key{RET}}, @pxref{Merging}).
2646    
2647    @vindex vc-cvs-global-switches
2648      The variable @code{vc-cvs-global-switches} should be a string
2649    specifying switches to pass to CVS for all CVS operations.
2650    
2651    When @code{vc-cvs-stay-local} is @code{t}, VC also makes local    When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
2652  version backups, so that simple diff and revert operations are  version backups, so that simple diff and revert operations are
2653  completely local (@pxref{Version Backups}).  completely local (@pxref{Version Backups}).
# Line 2703  make a verbose listing including sizes, Line 2711  make a verbose listing including sizes,
2711    
2712  @vindex list-directory-brief-switches  @vindex list-directory-brief-switches
2713  @vindex list-directory-verbose-switches  @vindex list-directory-verbose-switches
2714    The text of a directory listing is obtained by running @code{ls} in an    The text of a directory listing is mostly obtained by running
2715  inferior process.  Two Emacs variables control the switches passed to  @code{ls} in an inferior process.  Two Emacs variables control the
2716  @code{ls}: @code{list-directory-brief-switches} is a string giving the  switches passed to @code{ls}: @code{list-directory-brief-switches} is
2717  switches to use in brief listings (@code{"-CF"} by default), and  a string giving the switches to use in brief listings (@code{"-CF"} by
2718  @code{list-directory-verbose-switches} is a string giving the switches to  default), and @code{list-directory-verbose-switches} is a string
2719  use in a verbose listing (@code{"-l"} by default).  giving the switches to use in a verbose listing (@code{"-l"} by
2720    default).
2721    
2722    @vindex directory-free-space-program
2723    @vindex directory-free-space-args
2724      Emacs adds information about the amount of free space on the disk
2725    that contains the directory.  To do this, it runs the program
2726    specified by @code{directory-free-space-program} with arguments
2727    @code{directory-free-space-args}.
2728    
2729  @node Comparing Files  @node Comparing Files
2730  @section Comparing Files  @section Comparing Files
# Line 2959  extract or manipulate the subfiles in th Line 2975  extract or manipulate the subfiles in th
2975  @node Remote Files  @node Remote Files
2976  @section Remote Files  @section Remote Files
2977    
2978    @cindex Tramp
2979  @cindex FTP  @cindex FTP
2980  @cindex remote file access  @cindex remote file access
2981    You can refer to files on other machines using a special file name syntax:    You can refer to files on other machines using a special file name
2982    syntax:
2983    
2984  @example  @example
2985  @group  @group
2986  /@var{host}:@var{filename}  /@var{host}:@var{filename}
2987  /@var{user}@@@var{host}:@var{filename}  /@var{user}@@@var{host}:@var{filename}
2988  /@var{user}@@@var{host}#@var{port}:@var{filename}  /@var{user}@@@var{host}#@var{port}:@var{filename}
2989    /@var{method}:@var{user}@@@var{host}:@var{filename}
2990    /@var{method}:@var{user}@@@var{host}#@var{port}:@var{filename}
2991  @end group  @end group
2992  @end example  @end example
2993    
2994  @noindent  @noindent
2995  When you do this, Emacs uses the FTP program to read and write files on  When you do this, Emacs may use the FTP program to access files on the
2996  the specified host.  It logs in through FTP using your user name or the  remote host, or Emacs may use a remote-login program (such as
2997  name @var{user}.  It may ask you for a password from time to time; this  @command{ssh}, @command{rlogin}, or @command{telnet}) to do this.
2998  is used for logging in on @var{host}.  The form using @var{port} allows  
2999  you to access servers running on a non-default TCP port.  You can always specify in the file name which method should be used to
3000    access the remote files, for example
3001    @file{/ftp:@var{user}@@@var{host}:@var{filename}} uses FTP, whereas
3002    @file{/ssh:@var{user}@@@var{host}:@var{filename}} uses @command{ssh}.
3003    When you don't specify a method in the file name, Emacs determines a
3004    default method according to the following rules:
3005    
3006    @enumerate
3007    @item
3008    If the host name starts with @samp{ftp.} (with dot), then Emacs assumes
3009    the @command{ftp} method.
3010    @item
3011    If the user name is @samp{ftp} or @samp{anonymous}, then Emacs assumes
3012    the @command{ftp} method.
3013    @item
3014    Otherwise, Emacs assumes the @command{ssh} method.
3015    @end enumerate
3016    
3017    @noindent
3018    Remote file access through FTP is handled by the Ange-FTP package, which
3019    is documented in the following.  Remote file access through the other
3020    methods is handled by the Tramp package, which has its own manual.
3021    @xref{Top, The Tramp Manual,, tramp, The Tramp Manual}.
3022    
3023    When the Ange-FTP package is used, Emacs logs in through FTP using your
3024    user name or the name @var{user}.  It may ask you for a password from
3025    time to time; this is used for logging in on @var{host}.  The form using
3026    @var{port} allows you to access servers running on a non-default TCP
3027    port.
3028    
3029  @cindex backups for remote files  @cindex backups for remote files
3030  @vindex ange-ftp-make-backup-files  @vindex ange-ftp-make-backup-files

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.70.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26