diff options
| author | Chong Yidong | 2008-11-24 20:10:47 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-11-24 20:10:47 +0000 |
| commit | 606ff78adab3799b1c1734c0ca25cb61efb7437a (patch) | |
| tree | a7e67012340cf4b2600b1adf873fcf783245afcb | |
| parent | 2f4f09a94c9b1634af8da65f60c8d502da53eb6f (diff) | |
| download | emacs-606ff78adab3799b1c1734c0ca25cb61efb7437a.tar.gz emacs-606ff78adab3799b1c1734c0ca25cb61efb7437a.zip | |
(Visiting): Document new behavior of confirm-nonexistent-file-or-buffer.
| -rw-r--r-- | doc/emacs/files.texi | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 93a6161d782..a393e837c91 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi | |||
| @@ -240,14 +240,31 @@ moves or copies the file into the displayed directory. For details, | |||
| 240 | see @ref{Drag and Drop}, and @ref{Misc Dired Features}. | 240 | see @ref{Drag and Drop}, and @ref{Misc Dired Features}. |
| 241 | 241 | ||
| 242 | @cindex creating files | 242 | @cindex creating files |
| 243 | What if you want to create a new file? Just visit it. Emacs | ||
| 244 | displays @samp{(New file)} in the echo area, but in other respects | ||
| 245 | behaves as if you had visited an existing empty file. If you make | ||
| 246 | changes and save them, the file is created. | ||
| 247 | |||
| 248 | @cindex minibuffer confirmation | ||
| 249 | @cindex confirming in the minibuffer | ||
| 250 | When you attempt to visit a new file, Emacs might prompt you for | ||
| 251 | confirmation first, in case you entered the wrong file name. Emacs | ||
| 252 | asks for confirmation only if the last key you typed in the | ||
| 253 | minibuffer, before submitting the input with @key{RET}, was @key{TAB} | ||
| 254 | (@code{minibuffer-complete}). This catches a common mistake, in which | ||
| 255 | one types @key{RET} before realizing that @key{TAB} did not complete | ||
| 256 | far enough to yield a desired file name (@pxref{Completion}). Emacs | ||
| 257 | asks for confirmation by putting the message @samp{[Confirm]} in the | ||
| 258 | minibuffer; type @key{RET} again to confirm and visit the file. | ||
| 259 | |||
| 243 | @vindex confirm-nonexistent-file-or-buffer | 260 | @vindex confirm-nonexistent-file-or-buffer |
| 244 | What if you want to create a new file? Just visit it. | 261 | The variable @code{confirm-nonexistent-file-or-buffer} controls |
| 245 | Emacs prompts you for confirmation before visiting a non-existent | 262 | whether Emacs asks for confirmation before visiting a new file. The |
| 246 | file, and displays @samp{(New file)} in the echo area, but in other | 263 | default value, @code{after-completion}, gives the behavior we have |
| 247 | respects behaves as if you had visited an existing empty file. If you | 264 | just described. If the value is @code{nil}, Emacs never asks for |
| 248 | make changes and save them, the file is created. If you change the | 265 | confirmation; for any other non-@code{nil} value, Emacs always asks |
| 249 | variable @code{confirm-nonexistent-file-or-buffer} to @code{nil}, then | 266 | for confirmation. This variable also affects the |
| 250 | Emacs will not even prompt you for confirmation. | 267 | @code{switch-to-buffer} command (@pxref{Select Buffer}). |
| 251 | 268 | ||
| 252 | @kindex C-x C-v | 269 | @kindex C-x C-v |
| 253 | @findex find-alternate-file | 270 | @findex find-alternate-file |