comparison man/files.texi @ 46212:895fd595b5fb

Explain that $FOO stands for itself if FOO is not defined. New feature in auto-save-file-name-transforms. Add vc-cvs-global-switches. Add directory-free-space-program and directory-free-space-args.
author Richard M. Stallman <rms@gnu.org>
date Sun, 07 Jul 2002 12:16:45 +0000
parents 87962bf716e3
children 0695dbe46ee5
comparison
equal deleted inserted replaced
46211:6639617e399f 46212:895fd595b5fb
102 @xref{Minibuffer File}. 102 @xref{Minibuffer File}.
103 103
104 @cindex environment variables in file names 104 @cindex environment variables in file names
105 @cindex expansion of environment variables 105 @cindex expansion of environment variables
106 @cindex @code{$} in file names 106 @cindex @code{$} in file names
107 @anchor{File Names with $} 107 @anchor{File Names with $}@samp{$} in a file name is used to
108 @samp{$} in a file name is used to substitute environment variables. 108 substitute an environment variable. The environment variable name
109 For example, if you have used the shell command @command{export 109 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
110 FOO=rms/hacks} to set up an environment variable named @env{FOO}, then 112 FOO=rms/hacks} to set up an environment variable named @env{FOO}, then
111 you can use @file{/u/$FOO/test.c} or @file{/u/$@{FOO@}/test.c} as an 113 you can use @file{/u/$FOO/test.c} or @file{/u/$@{FOO@}/test.c} as an
112 abbreviation for @file{/u/rms/hacks/test.c}. The environment variable 114 abbreviation for @file{/u/rms/hacks/test.c}. If the environment
113 name consists of all the alphanumeric characters after the @samp{$}; 115 variable is not defined, no substitution occurs: @file{/u/$notdefined}
114 alternatively, it may be enclosed in braces after the @samp{$}. Note 116 stands for itself (assuming the environment variable @env{notdefined}
115 that shell commands to set environment variables affect Emacs only if 117 is not defined).
116 done before Emacs is started. 118
119 Note that shell commands to set environment variables affect Emacs
120 only when done before Emacs is started.
117 121
118 @cindex home directory shorthand 122 @cindex home directory shorthand
119 You can use the @file{~/} in a file name to mean your home directory, 123 You can use the @file{~/} in a file name to mean your home directory,
120 or @file{~@var{user-id}/} to mean the home directory of a user whose 124 or @file{~@var{user-id}/} to mean the home directory of a user whose
121 login name is @code{user-id}. (On DOS and Windows systems, where a user 125 login name is @code{user-id}. (On DOS and Windows systems, where a user
122 doesn't have a home directory, Emacs substitutes @file{~/} with the 126 doesn't have a home directory, Emacs substitutes @file{~/} with the
123 value of the environment variable @code{HOME}; see @ref{General 127 value of the environment variable @code{HOME}; see @ref{General
124 Variables}.) 128 Variables}.)
125 129
126 To access a file with @samp{$} in its name, type @samp{$$}. This pair 130 To access a file with @samp{$} in its name, if the @samp{$} causes
127 is converted to a single @samp{$} at the same time as variable 131 expansion, type @samp{$$}. This pair is converted to a single
128 substitution is performed for a single @samp{$}. Alternatively, quote the 132 @samp{$} at the same time as variable substitution is performed for a
129 whole file name with @samp{/:} (@pxref{Quoted File Names}). File names 133 single @samp{$}. Alternatively, quote the whole file name with
130 which begin with a literal @samp{~} should also be quoted with @samp{/:}. 134 @samp{/:} (@pxref{Quoted File Names}). File names which begin with a
135 literal @samp{~} should also be quoted with @samp{/:}.
131 136
132 @findex substitute-in-file-name 137 @findex substitute-in-file-name
133 The Lisp function that performs the substitution is called 138 The Lisp function that performs the substitution is called
134 @code{substitute-in-file-name}. The substitution is performed only on 139 @code{substitute-in-file-name}. The substitution is performed only on
135 file names read as such using the minibuffer. 140 file names read as such using the minibuffer.
943 @code{auto-save-file-name-p}). The file name to be used for auto-saving 948 @code{auto-save-file-name-p}). The file name to be used for auto-saving
944 in a buffer is calculated when auto-saving is turned on in that buffer. 949 in a buffer is calculated when auto-saving is turned on in that buffer.
945 950
946 @cindex auto-save for remote files 951 @cindex auto-save for remote files
947 @vindex auto-save-file-name-transforms 952 @vindex auto-save-file-name-transforms
948 The variable @code{auto-save-file-name-transforms} allows a 953 The variable @code{auto-save-file-name-transforms} allows a degree
949 degree of control over the auto-save file name. The default value is 954 of control over the auto-save file name. It lets you specify a series
950 set up to put the auto-save files for remote files 955 of regular expressions and replacements to transform the auto save
951 (@pxref{Remote Files}) into the temporary file directory on the local 956 file name. The default value puts the auto-save files for remote
952 machine. 957 files (@pxref{Remote Files}) into the temporary file directory on the
958 local machine.
953 959
954 When you delete a substantial part of the text in a large buffer, auto 960 When you delete a substantial part of the text in a large buffer, auto
955 save turns off temporarily in that buffer. This is because if you 961 save turns off temporarily in that buffer. This is because if you
956 deleted the text unintentionally, you might find the auto-save file more 962 deleted the text unintentionally, you might find the auto-save file more
957 useful if it contains the deleted text. To reenable auto-saving after 963 useful if it contains the deleted text. To reenable auto-saving after
2637 else has already checked in other changes to the file, you are not 2643 else has already checked in other changes to the file, you are not
2638 notified of it until you actually try to commit. (But you can try to 2644 notified of it until you actually try to commit. (But you can try to
2639 pick up any recent changes from the repository first, using @kbd{C-x v m 2645 pick up any recent changes from the repository first, using @kbd{C-x v m
2640 @key{RET}}, @pxref{Merging}). 2646 @key{RET}}, @pxref{Merging}).
2641 2647
2648 @vindex vc-cvs-global-switches
2649 The variable @code{vc-cvs-global-switches} should be a string
2650 specifyng switches to pass to CVS for all CVS operations.
2651
2642 When @code{vc-cvs-stay-local} is @code{t}, VC also makes local 2652 When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
2643 version backups, so that simple diff and revert operations are 2653 version backups, so that simple diff and revert operations are
2644 completely local (@pxref{Version Backups}). 2654 completely local (@pxref{Version Backups}).
2645 2655
2646 On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil}, 2656 On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil},
2700 make a verbose listing including sizes, dates, and owners (like 2710 make a verbose listing including sizes, dates, and owners (like
2701 @samp{ls -l}). 2711 @samp{ls -l}).
2702 2712
2703 @vindex list-directory-brief-switches 2713 @vindex list-directory-brief-switches
2704 @vindex list-directory-verbose-switches 2714 @vindex list-directory-verbose-switches
2705 The text of a directory listing is obtained by running @code{ls} in an 2715 The text of a directory listing is mostly obtained by running
2706 inferior process. Two Emacs variables control the switches passed to 2716 @code{ls} in an inferior process. Two Emacs variables control the
2707 @code{ls}: @code{list-directory-brief-switches} is a string giving the 2717 switches passed to @code{ls}: @code{list-directory-brief-switches} is
2708 switches to use in brief listings (@code{"-CF"} by default), and 2718 a string giving the switches to use in brief listings (@code{"-CF"} by
2709 @code{list-directory-verbose-switches} is a string giving the switches to 2719 default), and @code{list-directory-verbose-switches} is a string
2710 use in a verbose listing (@code{"-l"} by default). 2720 giving the switches to use in a verbose listing (@code{"-l"} by
2721 default).
2722
2723 @vindex directory-free-space-program
2724 @vindex directory-free-space-args
2725 Emacs adds information about the amount of free space on the disk
2726 that contains the directory. To do this, it runs the program
2727 specified by @code{directory-free-space-program} with arguments
2728 @code{directory-free-space-args}.
2711 2729
2712 @node Comparing Files 2730 @node Comparing Files
2713 @section Comparing Files 2731 @section Comparing Files
2714 @cindex comparing files 2732 @cindex comparing files
2715 2733