comparison man/files.texi @ 37315:702729e72132

Change @var to @code in many places. Correct the case of some messages and buffer names. Minor cleanups.
author Richard M. Stallman <rms@gnu.org>
date Wed, 11 Apr 2001 08:32:46 +0000
parents 41f1140b1f53
children 9aada84f08c8
comparison
equal deleted inserted replaced
37314:54d45f89210f 37315:702729e72132
213 since you visited or saved it last. If the file has changed, a warning 213 since you visited or saved it last. If the file has changed, a warning
214 message is printed. @xref{Interlocking,,Simultaneous Editing}. 214 message is printed. @xref{Interlocking,,Simultaneous Editing}.
215 215
216 @cindex creating files 216 @cindex creating files
217 What if you want to create a new file? Just visit it. Emacs prints 217 What if you want to create a new file? Just visit it. Emacs prints
218 @samp{(New File)} in the echo area, but in other respects behaves as if 218 @samp{(New file)} in the echo area, but in other respects behaves as if
219 you had visited an existing empty file. If you make any changes and 219 you had visited an existing empty file. If you make any changes and
220 save them, the file is created. 220 save them, the file is created.
221 221
222 Emacs recognizes from the contents of a file which convention it uses 222 Emacs recognizes from the contents of a file which convention it uses
223 to separate lines---newline (used on GNU/Linux and on Unix), 223 to separate lines---newline (used on GNU/Linux and on Unix),
772 the current one. Once the group is set up, every time you exit Emacs, 772 the current one. Once the group is set up, every time you exit Emacs,
773 it will copy the file you edited to the other files in its group. You 773 it will copy the file you edited to the other files in its group. You
774 can also do the copying without exiting Emacs, by typing @kbd{M-x 774 can also do the copying without exiting Emacs, by typing @kbd{M-x
775 shadow-copy-files}. 775 shadow-copy-files}.
776 776
777 To set up a file group, use @kbd{M-x shadow-define-literal-group} or 777 To set up a shadow file group, use @kbd{M-x
778 @kbd{M-x shadow-define-regexp-group}. See their documentation strings 778 shadow-define-literal-group} or @kbd{M-x shadow-define-regexp-group}.
779 for further information. 779 See their documentation strings for further information.
780 780
781 Before copying a file to its shadows, Emacs asks for confirmation. 781 Before copying a file to its shadows, Emacs asks for confirmation.
782 You can answer ``no'' to bypass copying of this file, this time. If 782 You can answer ``no'' to bypass copying of this file, this time. If
783 you want to cancel the shadowing permanently for a certain file, use 783 you want to cancel the shadowing permanently for a certain file, use
784 @kbd{M-x shadow-cancel} to eliminate or change the shadow file group. 784 @kbd{M-x shadow-cancel} to eliminate or change the shadow file group.
1479 1479
1480 To register the file, Emacs must choose which version control system 1480 To register the file, Emacs must choose which version control system
1481 to use for it. If the file's directory already contains files 1481 to use for it. If the file's directory already contains files
1482 registered in a version control system, Emacs uses that system. If 1482 registered in a version control system, Emacs uses that system. If
1483 there is more than one system in use for a directory, Emacs uses the one 1483 there is more than one system in use for a directory, Emacs uses the one
1484 that appears first in @var{vc-handled-backends} (@pxref{Customizing VC}). 1484 that appears first in @code{vc-handled-backends} (@pxref{Customizing VC}).
1485 On the other hand, if there are no files already registered, 1485 On the other hand, if there are no files already registered,
1486 Emacs uses the first system from @var{vc-handled-backends} that could 1486 Emacs uses the first system from @code{vc-handled-backends} that could
1487 register the file---for example, you cannot register a file under CVS if 1487 register the file---for example, you cannot register a file under CVS if
1488 its directory is not already part of a CVS tree. 1488 its directory is not already part of a CVS tree.
1489 1489
1490 With the default value of @var{vc-handled-backends}, this means that 1490 With the default value of @code{vc-handled-backends}, this means
1491 Emacs uses RCS if there are any files under RCS control, or CVS if 1491 that Emacs uses RCS if there are any files under RCS control, CVS if
1492 there are any files under CVS, or RCS as the ultimate default. 1492 there are any files under CVS, SCCS if any files are under SCCS, or
1493 RCS as the ultimate default.
1493 1494
1494 If locking is in use, @kbd{C-x v i} leaves the file unlocked and 1495 If locking is in use, @kbd{C-x v i} leaves the file unlocked and
1495 read-only. Type @kbd{C-x C-q} if you wish to start editing it. After 1496 read-only. Type @kbd{C-x C-q} if you wish to start editing it. After
1496 registering a file with CVS, you must subsequently commit the initial 1497 registering a file with CVS, you must subsequently commit the initial
1497 version by typing @kbd{C-x C-q}. 1498 version by typing @kbd{C-x C-q}.
1685 1686
1686 @findex vc-dired-toggle-terse-mode 1687 @findex vc-dired-toggle-terse-mode
1687 @findex vc-dired-mark-locked 1688 @findex vc-dired-mark-locked
1688 You can toggle between terse display (only locked files, or files not 1689 You can toggle between terse display (only locked files, or files not
1689 up-to-date) and full display at any time by typing @kbd{v t} 1690 up-to-date) and full display at any time by typing @kbd{v t}
1690 @code{vc-dired-toggle-terse-mode}. There is also a special command 1691 (@code{vc-dired-toggle-terse-mode}). There is also a special command
1691 @kbd{* l} (@code{vc-dired-mark-locked}), which marks all files currently 1692 @kbd{* l} (@code{vc-dired-mark-locked}), which marks all files currently
1692 locked (or, with CVS, all files not up-to-date). Thus, typing @kbd{* l 1693 locked (or, with CVS, all files not up-to-date). Thus, typing @kbd{* l
1693 t k} is another way to delete from the buffer all files except those 1694 t k} is another way to delete from the buffer all files except those
1694 currently locked. 1695 currently locked.
1695 1696
1967 mechanism works with any combination of version control systems 1968 mechanism works with any combination of version control systems
1968 (@dfn{back ends}). 1969 (@dfn{back ends}).
1969 1970
1970 To make it work with other back ends, you must make sure that the 1971 To make it work with other back ends, you must make sure that the
1971 ``more local'' back end comes before the ``more remote'' back end in 1972 ``more local'' back end comes before the ``more remote'' back end in
1972 the setting of @var{vc-handled-backends} (@pxref{Customizing VC}). By 1973 the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By
1973 default, this variable is set up so that you can use remote CVS and 1974 default, this variable is set up so that you can use remote CVS and
1974 local RCS as described here. 1975 local RCS as described here.
1975 1976
1976 To start using local RCS for a file that comes from a remote CVS 1977 To start using local RCS for a file that comes from a remote CVS
1977 server, you must @emph{register the file in RCS}, by typing @kbd{C-u 1978 server, you must @emph{register the file in RCS}, by typing @kbd{C-u
2401 2402
2402 @node Customizing VC 2403 @node Customizing VC
2403 @subsection Customizing VC 2404 @subsection Customizing VC
2404 2405
2405 @vindex vc-handled-backends 2406 @vindex vc-handled-backends
2406 The variable @var{vc-handled-backends} determines which version 2407 The variable @code{vc-handled-backends} determines which version
2407 control systems VC should handle. The default value is @code{(RCS CVS 2408 control systems VC should handle. The default value is @code{(RCS CVS
2408 SCCS)}, so it contains all three version systems that are currently 2409 SCCS)}, so it contains all three version systems that are currently
2409 supported. If you want VC to ignore one or more of these systems, 2410 supported. If you want VC to ignore one or more of these systems,
2410 exclude its name from the list. 2411 exclude its name from the list.
2411 2412
2412 The order of systems in the list is significant: when you visit a file 2413 The order of systems in the list is significant: when you visit a file
2413 is registered in more than one system (@pxref{Local Version Control}), 2414 registered in more than one system (@pxref{Local Version Control}),
2414 VC uses the system that comes first in @var{vc-handled-backends} by 2415 VC uses the system that comes first in @code{vc-handled-backends} by
2415 default. The order is also significant when you register a file for 2416 default. The order is also significant when you register a file for
2416 the first time, @pxref{Registering} for details. 2417 the first time, @pxref{Registering} for details.
2417 2418
2418 @menu 2419 @menu
2419 * General VC Options:: Options that apply to multiple back ends. 2420 * General VC Options:: Options that apply to multiple back ends.
2511 changed erroneously, set @code{vc-mistrust-permissions} to @code{t}. 2512 changed erroneously, set @code{vc-mistrust-permissions} to @code{t}.
2512 Then VC always checks the master file to determine the file's status. 2513 Then VC always checks the master file to determine the file's status.
2513 2514
2514 VC determines the version control state of files under SCCS much as 2515 VC determines the version control state of files under SCCS much as
2515 with RCS. It does not consider SCCS version headers, though. Thus, 2516 with RCS. It does not consider SCCS version headers, though. Thus,
2516 the variable @var{vc-mistrust-permissions} affects SCCS use, but 2517 the variable @code{vc-mistrust-permissions} affects SCCS use, but
2517 @var{vc-consult-headers} does not. 2518 @code{vc-consult-headers} does not.
2518 2519
2519 @node CVS Options 2520 @node CVS Options
2520 @subsubsection Options specific for CVS 2521 @subsubsection Options specific for CVS
2521 2522
2522 @cindex locking (CVS) 2523 @cindex locking (CVS)
2548 2549
2549 @vindex vc-cvs-stay-local 2550 @vindex vc-cvs-stay-local
2550 @cindex remote repositories (CVS) 2551 @cindex remote repositories (CVS)
2551 When a file's repository is on a remote machine, VC tries to keep 2552 When a file's repository is on a remote machine, VC tries to keep
2552 network interactions to a minimum. This is controlled by the variable 2553 network interactions to a minimum. This is controlled by the variable
2553 @var{vc-cvs-stay-local}. If it is @code{t} (the default), then VC uses 2554 @code{vc-cvs-stay-local}. If it is @code{t} (the default), then VC uses
2554 only the entry in the local CVS subdirectory to determine the file's 2555 only the entry in the local CVS subdirectory to determine the file's
2555 state (and possibly information returned by previous CVS commands). One 2556 state (and possibly information returned by previous CVS commands). One
2556 consequence of this is that when you have modified a file, and somebody 2557 consequence of this is that when you have modified a file, and somebody
2557 else has already checked in other changes to the file, you are not 2558 else has already checked in other changes to the file, you are not
2558 notified of it until you actually try to commit. (But you can try to 2559 notified of it until you actually try to commit. (But you can try to
2559 pick up any recent changes from the repository first, using @kbd{C-x v m 2560 pick up any recent changes from the repository first, using @kbd{C-x v m
2560 @key{RET}}, @pxref{Merging}). 2561 @key{RET}}, @pxref{Merging}).
2561 2562
2562 When @var{vc-cvs-stay-local} is @code{t}, VC also makes local 2563 When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
2563 version backups, so that simple diff and revert operations are 2564 version backups, so that simple diff and revert operations are
2564 completely local (@pxref{Version Backups}). 2565 completely local (@pxref{Version Backups}).
2565 2566
2566 On the other hand, if you set @var{vc-cvs-stay-local} to @code{nil}, 2567 On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil},
2567 then VC queries the remote repository @emph{before} it decides what to 2568 then VC queries the remote repository @emph{before} it decides what to
2568 do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local 2569 do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local
2569 repositories. It also does not make any version backups. 2570 repositories. It also does not make any version backups.
2570 2571
2571 You can also set @var{vc-cvs-stay-local} to a regular expression 2572 You can also set @code{vc-cvs-stay-local} to a regular expression
2572 that is matched against the repository hostname; VC then stays local 2573 that is matched against the repository hostname; VC then stays local
2573 only for repositories from hosts that match the pattern. 2574 only for repositories from hosts that match the pattern.
2574 2575
2575 @node Directories 2576 @node Directories
2576 @section File Directories 2577 @section File Directories
2615 C-x C-d /u2/emacs/src/*.c @key{RET} 2616 C-x C-d /u2/emacs/src/*.c @key{RET}
2616 @end example 2617 @end example
2617 2618
2618 Normally, @kbd{C-x C-d} prints a brief directory listing containing 2619 Normally, @kbd{C-x C-d} prints a brief directory listing containing
2619 just file names. A numeric argument (regardless of value) tells it to 2620 just file names. A numeric argument (regardless of value) tells it to
2620 make a verbose listing including sizes, dates, and authors (like 2621 make a verbose listing including sizes, dates, and owners (like
2621 @samp{ls -l}). 2622 @samp{ls -l}).
2622 2623
2623 @vindex list-directory-brief-switches 2624 @vindex list-directory-brief-switches
2624 @vindex list-directory-verbose-switches 2625 @vindex list-directory-verbose-switches
2625 The text of a directory listing is obtained by running @code{ls} in an 2626 The text of a directory listing is obtained by running @code{ls} in an
2634 @cindex comparing files 2635 @cindex comparing files
2635 2636
2636 @findex diff 2637 @findex diff
2637 @vindex diff-switches 2638 @vindex diff-switches
2638 The command @kbd{M-x diff} compares two files, displaying the 2639 The command @kbd{M-x diff} compares two files, displaying the
2639 differences in an Emacs buffer named @samp{*Diff*}. It works by running 2640 differences in an Emacs buffer named @samp{*diff*}. It works by running
2640 the @code{diff} program, using options taken from the variable 2641 the @code{diff} program, using options taken from the variable
2641 @code{diff-switches}, whose value should be a string. 2642 @code{diff-switches}, whose value should be a string.
2642 2643
2643 The buffer @samp{*Diff*} has Compilation mode as its major mode, so 2644 The buffer @samp{*diff*} has Compilation mode as its major mode, so
2644 you can use @kbd{C-x `} to visit successive changed locations in the two 2645 you can use @kbd{C-x `} to visit successive changed locations in the two
2645 source files. You can also move to a particular hunk of changes and 2646 source files. You can also move to a particular hunk of changes and
2646 type @key{RET} or @kbd{C-c C-c}, or click @kbd{Mouse-2} on it, to move 2647 type @key{RET} or @kbd{C-c C-c}, or click @kbd{Mouse-2} on it, to move
2647 to the corresponding source location. You can also use the other 2648 to the corresponding source location. You can also use the other
2648 special commands of Compilation mode: @key{SPC} and @key{DEL} for 2649 special commands of Compilation mode: @key{SPC} and @key{DEL} for
2780 @vindex auto-compression-mode 2781 @vindex auto-compression-mode
2781 Emacs comes with a library that can automatically uncompress 2782 Emacs comes with a library that can automatically uncompress
2782 compressed files when you visit them, and automatically recompress them 2783 compressed files when you visit them, and automatically recompress them
2783 if you alter them and save them. To enable this feature, type the 2784 if you alter them and save them. To enable this feature, type the
2784 command @kbd{M-x auto-compression-mode}. You can enable it permanently 2785 command @kbd{M-x auto-compression-mode}. You can enable it permanently
2785 by customizing the option @var{auto-compression-mode}. 2786 by customizing the option @code{auto-compression-mode}.
2786 2787
2787 When automatic compression (which implies automatic uncompression as 2788 When automatic compression (which implies automatic uncompression as
2788 well) is enabled, Emacs recognizes compressed files by their file names. 2789 well) is enabled, Emacs recognizes compressed files by their file names.
2789 File names ending in @samp{.gz} indicate a file compressed with 2790 File names ending in @samp{.gz} indicate a file compressed with
2790 @code{gzip}. Other endings indicate other compression programs. 2791 @code{gzip}. Other endings indicate other compression programs.
2863 owner, are supported only for some of the archive formats. 2864 owner, are supported only for some of the archive formats.
2864 2865
2865 Unlike Tar mode, Archive mode runs the archiving program to unpack 2866 Unlike Tar mode, Archive mode runs the archiving program to unpack
2866 and repack archives. Details of the program names and their options 2867 and repack archives. Details of the program names and their options
2867 can be set in the @samp{Archive} Customize group. However, you don't 2868 can be set in the @samp{Archive} Customize group. However, you don't
2868 need these programs to the archive table of contents, only to extract 2869 need these programs to look at the archive table of contents, only to
2869 or manipulate the subfiles in the archive. 2870 extract or manipulate the subfiles in the archive.
2870 2871
2871 @node Remote Files 2872 @node Remote Files
2872 @section Remote Files 2873 @section Remote Files
2873 2874
2874 @cindex FTP 2875 @cindex FTP
2932 ange-ftp @key{RET}}. 2933 ange-ftp @key{RET}}.
2933 2934
2934 @vindex file-name-handler-alist 2935 @vindex file-name-handler-alist
2935 @cindex disabling remote files 2936 @cindex disabling remote files
2936 You can entirely turn off the FTP file name feature by removing the 2937 You can entirely turn off the FTP file name feature by removing the
2937 entries @var{ange-ftp-completion-hook-function} and 2938 entries @code{ange-ftp-completion-hook-function} and
2938 @var{ange-ftp-hook-function} from the variable 2939 @code{ange-ftp-hook-function} from the variable
2939 @code{file-name-handler-alist}. You can turn off the feature in 2940 @code{file-name-handler-alist}. You can turn off the feature in
2940 individual cases by quoting the file name with @samp{/:} (@pxref{Quoted 2941 individual cases by quoting the file name with @samp{/:} (@pxref{Quoted
2941 File Names}). 2942 File Names}).
2942 2943
2943 @node Quoted File Names 2944 @node Quoted File Names
2957 character for a user's home directory. For example, @file{/:/tmp/~hack} 2958 character for a user's home directory. For example, @file{/:/tmp/~hack}
2958 refers to a file whose name is @file{~hack} in directory @file{/tmp}. 2959 refers to a file whose name is @file{~hack} in directory @file{/tmp}.
2959 2960
2960 Likewise, quoting with @samp{/:} is one way to enter in the minibuffer 2961 Likewise, quoting with @samp{/:} is one way to enter in the minibuffer
2961 a file name that contains @samp{$}. However, the @samp{/:} must be at 2962 a file name that contains @samp{$}. However, the @samp{/:} must be at
2962 the beginning of the buffer in order to quote @samp{$}. 2963 the beginning of the minibuffer in order to quote @samp{$}.
2963 2964
2964 You can also quote wildcard characters with @samp{/:}, for visiting. 2965 You can also quote wildcard characters with @samp{/:}, for visiting.
2965 For example, @file{/:/tmp/foo*bar} visits the file @file{/tmp/foo*bar}. 2966 For example, @file{/:/tmp/foo*bar} visits the file @file{/tmp/foo*bar}.
2966 However, in most cases you can simply type the wildcard characters for 2967 However, in most cases you can simply type the wildcard characters for
2967 themselves. For example, if the only file name in @file{/tmp} that 2968 themselves. For example, if the only file name in @file{/tmp} that
3015 @findex recentf-mode 3016 @findex recentf-mode
3016 @vindex recentf-mode 3017 @vindex recentf-mode
3017 @findex recentf-save-list 3018 @findex recentf-save-list
3018 @findex recentf-edit-list 3019 @findex recentf-edit-list
3019 If you enable Recentf mode, with @kbd{M-x recentf-mode}, the 3020 If you enable Recentf mode, with @kbd{M-x recentf-mode}, the
3020 @samp{Files} menu includes a submenu containing a list of recently 3021 @samp{File} menu includes a submenu containing a list of recently
3021 opened files. @kbd{M-x recentf-save-list} saves the current 3022 opened files. @kbd{M-x recentf-save-list} saves the current
3022 recent-file-list to a file, and @kbd{M-x recentf-edit-list} edits it. 3023 @code{recent-file-list} to a file, and @kbd{M-x recentf-edit-list}
3024 edits it.
3023 3025
3024 @findex auto-image-file-mode 3026 @findex auto-image-file-mode
3025 @findex mode, auto-image-file 3027 @findex mode, auto-image-file
3026 @cindex images, visiting 3028 @cindex images, visiting
3027 @cindex visiting image files 3029 @cindex visiting image files