Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
606ff78a
Commit
606ff78a
authored
Nov 24, 2008
by
Chong Yidong
Browse files
(Visiting): Document new behavior of confirm-nonexistent-file-or-buffer.
parent
2f4f09a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
doc/emacs/files.texi
doc/emacs/files.texi
+24
-7
No files found.
doc/emacs/files.texi
View file @
606ff78a
...
...
@@ -240,14 +240,31 @@ moves or copies the file into the displayed directory. For details,
see @ref{Drag and Drop}, and @ref{Misc Dired Features}.
@cindex creating files
What if you want to create a new file? Just visit it. Emacs
displays @samp{(New file)} in the echo area, but in other respects
behaves as if you had visited an existing empty file. If you make
changes and save them, the file is created.
@cindex minibuffer confirmation
@cindex confirming in the minibuffer
When you attempt to visit a new file, Emacs might prompt you for
confirmation first, in case you entered the wrong file name. Emacs
asks for confirmation only if the last key you typed in the
minibuffer, before submitting the input with @key{RET}, was @key{TAB}
(@code{minibuffer-complete}). This catches a common mistake, in which
one types @key{RET} before realizing that @key{TAB} did not complete
far enough to yield a desired file name (@pxref{Completion}). Emacs
asks for confirmation by putting the message @samp{[Confirm]} in the
minibuffer; type @key{RET} again to confirm and visit the file.
@vindex confirm-nonexistent-file-or-buffer
What if you want to create a new file? Just visit it.
Emacs prompts you
for confirmation before visiting a n
on-existent
file, and displays @samp{(New file)} in the echo area, but in other
respects behaves as if you had visited an existing empty file. If you
make changes and save them, the file is created. If you change the
variable @code{confirm-nonexistent-file-or-buffer} to @code{nil},
the
n
Emacs will not even prompt you for confirmation
.
The variable @code{confirm-nonexistent-file-or-buffer} controls
whether Emacs asks
for confirmation before visiting a n
ew file. The
default value, @code{after-completion}, gives the behavior we have
just described. If the value is @code{nil}, Emacs never asks for
confirmation; for any other non-@code{nil} value, Emacs always asks
for confirmation. This variable also affects
the
@code{switch-to-buffer} command (@pxref{Select Buffer})
.
@kindex C-x C-v
@findex find-alternate-file
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment