The buffer-menu facility is like a "Dired for buffers"; it allows you to request operations on various Emacs buffers by editing an Emacs buffer containing a list of them. You can save buffers, kill them (here called deleting them, for consistency with Dired), or display them.
The command buffer-menu
writes a list of all Emacs buffers into
the buffer `*Buffer List*', and selects that buffer in Buffer Menu
mode. The buffer is read-only, and can be changed only through the
special commands described in this section. The usual Emacs cursor
motion commands can be used in the `*Buffer List*' buffer. The
following commands apply to the buffer described on the current line.
The d, C-d, s and u commands to add or remove flags also move down (or up) one line. They accept a numeric argument as a repeat count.
These commands operate immediately on the buffer listed on the current line:
There are also commands to select another buffer or buffers:
All that buffer-menu
does directly is create and switch to a
suitable buffer, and turn on Buffer Menu mode. Everything else
described above is implemented by the special commands provided in
Buffer Menu mode. One consequence of this is that you can switch from
the `*Buffer List*' buffer to another Emacs buffer, and edit there.
You can reselect the `*Buffer List*' buffer later, to perform the
operations already requested, or you can kill it, or pay no further
attention to it.
The only difference between buffer-menu
and list-buffers
is that buffer-menu
switches to the `*Buffer List*' buffer
in the selected window; list-buffers
displays it in another
window. If you run list-buffers
(that is, type C-x C-b)
and select the buffer list manually, you can use all of the commands
described here.
The buffer `*Buffer List*' is not updated automatically when
buffers are created and killed; its contents are just text. If you have
created, deleted or renamed buffers, the way to update `*Buffer
List*' to show what you have done is to type g
(revert-buffer
) or repeat the buffer-menu
command.
Go to the first, previous, next, last section, table of contents.