Emacs: List Buffers

By Xah Lee. Date: . Last updated: .

What is Buffer

In emacs, every file is shown in a “buffer”. (You can think of “buffer” as opened file or tabbed window without the tab. It's called buffer because back in 1980s, emacs can only display parts of a file.)

List buffers

Alt+x list-buffersCtrl+x Ctrl+b
List buffers.
Alt+x ibuffer
Improved version of list buffers. It colors the files by type.
emacs list-buffers 2021-07-20
emacs list-buffers 2021-07-20
emacs ibuffer 2021-07-20
emacs ibuffer 2021-07-20

Make ibuffer Default

To make ibuffer default, put the following in your init file:

(defalias 'list-buffers 'ibuffer) ; make ibuffer default

Batch Operation on Buffers

You can do operation in batch to the marked ones. Example:

Here's most useful ibuffer commands.

Emacs, File and Buffer