tags:

views:

137

answers:

4

I'm not sure that's a great title so I'll describe what I'm trying to do.

I used to be able to open a new buffer in Emacs quickly using the command C-x b <non existent buffer name>

Somehow I've broken this in my version of Emacs (23.1). When ever I try to do this now I get the message [No match] in the command buffer.

Does anyone know what I might have done to break this functionality, or is it possible that I imagined being able to do this?

+1  A: 

You probably enabled ido-mode. You need to press ENTER to confirm the creation of the buffer.

paprika
That doesn't appear to be the cause.
chollida
+1  A: 

If you have enabled ido-mode, you can still switch to the behavior you're familiar with. I do this frequently when I know I'll be creating a new named buffer.

C-x b C-b

nullptr
Also setting (setq ido-create-new-buffer 'always) might help.
antonj
I'm not using ido-mode.
chollida
+3  A: 

Set confirm-nonexistent-file-or-buffer to nil:

confirm-nonexistent-file-or-buffer is a variable defined in `files.el'.
Its value is after-completion

Documentation:
Whether confirmation is requested before visiting a new file or buffer.
If nil, confirmation is not requested.
If the value is `after-completion', confirmation is only
 requested if the user called `minibuffer-complete' right before
 `minibuffer-complete-and-exit'.
Any other non-nil value means to request confirmation.

This affects commands like `switch-to-buffer' and `find-file'.

You can customize this variable.

This variable was introduced, or its default value was changed, in
version 23.1 of Emacs.
scottfrazer
I've added this to my .emacs but no dice. `;; Don't prompt for non existent name when creating temp buffers(setq confirm-nonexistent-file-or-buffer nil)`Can you spot anything that I've done that isn't correct?
chollida
It works as advertised here. Do you have ido enabled as others have suggested?
scottfrazer
+1  A: 

You press C-j instead of hitting enter twice, which will bypass the confirmation and immediately open the new buffer. This works with or without ido-mode. This will have the same effect has pressing enter with confirm-nonexistent-file-or-buffer set to nil.

pheaver