Next: , Previous: , Up: Buffers   [Contents][Index]


15.4 Killing Buffers

After using Emacs for a while, you may accumulate a large number of buffers and may want to eliminate the ones you no longer need. There are several commands for doing this.

C-x k

Kill a buffer, specified by name (kill-buffer).

M-x kill-some-buffers

Offer to kill each buffer, one by one.

C-x k (kill-buffer) kills one buffer, whose name you specify in the minibuffer. If you type just RET in the minibuffer, the default, killing the current buffer, is used. If the current buffer is killed, the buffer that has been selected recently but does not appear in any window now is selected. If the buffer being killed contains unsaved changes, you are asked to confirm with yes before the buffer is killed.

The command M-x kill-some-buffers asks about each buffer, one by one. An answer of y means to kill the buffer. Killing the current buffer or a buffer containing unsaved changes selects a new buffer or asks for confirmation just like kill-buffer.