Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In emacs how can I kill multiple buffers without opening each individually

Tags:

emacs

I have a lot (~30) of buffers whose names start with the same substring. Is there a way I can pass a regular expression to the kill buffer command so I can kill all of them in one go?

like image 259
pseudosudo Avatar asked Apr 18 '14 14:04

pseudosudo


People also ask

How do I kill multiple buffers in Emacs?

Press TAB , select "kill buffers" from the available options. Other options are query-replace / occur / grep / revert, and a bunch of others.

Can you have only one buffer open in Emacs at a time?

Each Emacs window displays one Emacs buffer at any time. A single buffer may appear in more than one window; if it does, any changes in its text are displayed in all the windows where it appears.

Can you have more than one buffer open in Emacs?

Much better to use the multiple buffer feature of emacs. If you are editing the first file and want to start editing the second file, simply use the hot key C-x C-f or the menu selection File->Open File to start the second file. The second file is loaded into its own buffer.

How many buffers can be open in Emacs at a time?

The number of buffers you can have really has no limit. Most of the time, only one or two buffers are displayed, but even if you can't see them, all the buffers you create in an Emacs session are still active. You can think of them as a stack of pages, with the one being displayed as the top page.


1 Answers

The command I was looking for M-x kill-matching-buffers.

like image 61
pseudosudo Avatar answered Sep 26 '22 19:09

pseudosudo