Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get emacs to open a new buffer quickly?

Tags:

emacs

buffer

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?

like image 576
chollida Avatar asked Mar 03 '10 17:03

chollida


2 Answers

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.
like image 104
scottfrazer Avatar answered Oct 17 '22 06:10

scottfrazer


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

like image 7
Derek Slager Avatar answered Oct 17 '22 07:10

Derek Slager