aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2008-11-24 20:10:47 +0000
committerChong Yidong2008-11-24 20:10:47 +0000
commit606ff78adab3799b1c1734c0ca25cb61efb7437a (patch)
treea7e67012340cf4b2600b1adf873fcf783245afcb
parent2f4f09a94c9b1634af8da65f60c8d502da53eb6f (diff)
downloademacs-606ff78adab3799b1c1734c0ca25cb61efb7437a.tar.gz
emacs-606ff78adab3799b1c1734c0ca25cb61efb7437a.zip
(Visiting): Document new behavior of confirm-nonexistent-file-or-buffer.
-rw-r--r--doc/emacs/files.texi31
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,
240see @ref{Drag and Drop}, and @ref{Misc Dired Features}. 240see @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
244displays @samp{(New file)} in the echo area, but in other respects
245behaves as if you had visited an existing empty file. If you make
246changes 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
251confirmation first, in case you entered the wrong file name. Emacs
252asks for confirmation only if the last key you typed in the
253minibuffer, before submitting the input with @key{RET}, was @key{TAB}
254(@code{minibuffer-complete}). This catches a common mistake, in which
255one types @key{RET} before realizing that @key{TAB} did not complete
256far enough to yield a desired file name (@pxref{Completion}). Emacs
257asks for confirmation by putting the message @samp{[Confirm]} in the
258minibuffer; 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
245Emacs prompts you for confirmation before visiting a non-existent 262whether Emacs asks for confirmation before visiting a new file. The
246file, and displays @samp{(New file)} in the echo area, but in other 263default value, @code{after-completion}, gives the behavior we have
247respects behaves as if you had visited an existing empty file. If you 264just described. If the value is @code{nil}, Emacs never asks for
248make changes and save them, the file is created. If you change the 265confirmation; for any other non-@code{nil} value, Emacs always asks
249variable @code{confirm-nonexistent-file-or-buffer} to @code{nil}, then 266for confirmation. This variable also affects the
250Emacs 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