diff options
| author | Chong Yidong | 2008-10-12 00:46:08 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-10-12 00:46:08 +0000 |
| commit | 653ec62b85c1801d73d1424688d91180a2389d7d (patch) | |
| tree | eb5baa5c2400bbad52dd445b64f0ccafc396e400 | |
| parent | 4f959513273f410876017b678e8689007cafb802 (diff) | |
| download | emacs-653ec62b85c1801d73d1424688d91180a2389d7d.tar.gz emacs-653ec62b85c1801d73d1424688d91180a2389d7d.zip | |
(Minibuffer File): Add xref to File Names.
(Minibuffer File): Add discussion of `~' in file names. Add
insert-default-directory index reference.
| -rw-r--r-- | doc/emacs/mini.texi | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 905c026577e..2cdc0815626 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi | |||
| @@ -54,8 +54,8 @@ is in use, keystrokes do not echo. | |||
| 54 | Commands such as @kbd{C-x C-f} (@code{find-file}) use the minibuffer | 54 | Commands such as @kbd{C-x C-f} (@code{find-file}) use the minibuffer |
| 55 | to read a file name argument (@pxref{Basic Files}). When the | 55 | to read a file name argument (@pxref{Basic Files}). When the |
| 56 | minibuffer is used to read a file name, it typically starts out with | 56 | minibuffer is used to read a file name, it typically starts out with |
| 57 | some initial text---the @dfn{default directory}, which ends in a | 57 | some initial text ending in a slash. This is the @dfn{default |
| 58 | slash. For example, it may start out like this: | 58 | directory}. For example, it may start out like this: |
| 59 | 59 | ||
| 60 | @example | 60 | @example |
| 61 | Find File: /u2/emacs/src/ | 61 | Find File: /u2/emacs/src/ |
| @@ -64,7 +64,8 @@ Find File: /u2/emacs/src/ | |||
| 64 | @noindent | 64 | @noindent |
| 65 | Here, @samp{Find File:@: } is the prompt and @samp{/u2/emacs/src/} is | 65 | Here, @samp{Find File:@: } is the prompt and @samp{/u2/emacs/src/} is |
| 66 | the default directory. If you now type @kbd{buffer.c} as input, that | 66 | the default directory. If you now type @kbd{buffer.c} as input, that |
| 67 | specifies the file @file{/u2/emacs/src/buffer.c}. | 67 | specifies the file @file{/u2/emacs/src/buffer.c}. @xref{File Names}, |
| 68 | for information about the default directory. | ||
| 68 | 69 | ||
| 69 | You can specify the parent directory by adding @file{..}: for | 70 | You can specify the parent directory by adding @file{..}: for |
| 70 | example, @file{/u2/emacs/src/../lisp/simple.el} is equivalent to | 71 | example, @file{/u2/emacs/src/../lisp/simple.el} is equivalent to |
| @@ -89,13 +90,26 @@ Find File: /u2/emacs/src//etc/termcap | |||
| 89 | Emacs interprets a double slash as ``ignore everything before the | 90 | Emacs interprets a double slash as ``ignore everything before the |
| 90 | second slash in the pair.'' In the example above, | 91 | second slash in the pair.'' In the example above, |
| 91 | @samp{/u2/emacs/src/} is ignored, so the argument you supplied is | 92 | @samp{/u2/emacs/src/} is ignored, so the argument you supplied is |
| 92 | @file{/etc/termcap}. Similarly, Emacs interprets a tilde (@samp{~}) | 93 | @file{/etc/termcap}. The ignored part of the file name is dimmed if |
| 93 | as your home directory, ignoring everything before the tilde. | 94 | the terminal allows it (to disable this dimming, turn off File Name |
| 94 | 95 | Shadow mode with the command @kbd{M-x file-name-shadow-mode}.) | |
| 95 | The ignored part of the file name is dimmed if the terminal allows | 96 | |
| 96 | it. To disable this dimming, turn off File Name Shadow mode, a minor | 97 | @cindex home directory shorthand |
| 97 | mode, with the command @kbd{M-x file-name-shadow-mode}. | 98 | Emacs interprets @samp{~/} as your home directory. Thus, |
| 98 | 99 | @samp{~/foo/bar.txt} specifies a file named @samp{bar.txt}, inside a | |
| 100 | directory named @samp{foo}, which is in turn located in your home | ||
| 101 | directory. In addition, @file{~@var{user-id}/} means the home | ||
| 102 | directory of a user whose login name is @code{user-id}. Any leading | ||
| 103 | directory name in front of the @samp{~} is ignored: thus, | ||
| 104 | @samp{/u2/emacs/~/foo/bar.txt} is equivalent to @samp{~/foo/bar.txt}. | ||
| 105 | |||
| 106 | On MS-Windows and MS-DOS systems, where a user doesn't have a home | ||
| 107 | directory, Emacs replaces @file{~/} with the value of the environment | ||
| 108 | variable @code{HOME}; see @ref{General Variables}. On these systems, | ||
| 109 | the @file{~@var{user-id}/} construct is supported only for the current | ||
| 110 | user, i.e., only if @var{user-id} is the current user's login name. | ||
| 111 | |||
| 112 | @vindex insert-default-directory | ||
| 99 | To prevent Emacs from inserting the default directory when reading | 113 | To prevent Emacs from inserting the default directory when reading |
| 100 | file names, change the variable @code{insert-default-directory} to | 114 | file names, change the variable @code{insert-default-directory} to |
| 101 | @code{nil}. In that case, the minibuffer starts out empty. | 115 | @code{nil}. In that case, the minibuffer starts out empty. |