Next: , Previous: Select Buffer, Up: Buffers


24.2 Listing Existing Buffers

C-x C-b
List the existing buffers (list-buffers).

To display a list of existing buffers, type C-x C-b. Each line in the list shows one buffer's name, major mode and visited file. The buffers are listed in the order that they were current; the buffers that were current most recently come first.

*’ in the first field of a line indicates the buffer is “modified.” If several buffers are modified, it may be time to save some with C-x s (see Save Commands). ‘%’ indicates a read-only buffer. ‘.’ marks the current buffer. Here is an example of a buffer list:

     CRM Buffer                Size  Mode              File
     . * .emacs                3294  Emacs-Lisp        ~/.emacs
      %  *Help*                 101  Help
         search.c             86055  C                 ~/cvs/emacs/src/search.c
      %  src                  20959  Dired by name     ~/cvs/emacs/src/
       * *mail*                  42  Mail
      %  HELLO                 1607  Fundamental       ~/cvs/emacs/etc/HELLO
      %  NEWS                481184  Outline           ~/cvs/emacs/etc/NEWS
         *scratch*              191  Lisp Interaction
       * *Messages*            1554  Fundamental

Note that the buffer ‘*Help*’ was made by a help request; it is not visiting any file. The buffer src was made by Dired on the directory ~/cvs/emacs/src/. You can list only buffers that are visiting files by giving the command a prefix; for instance, by typing C-u C-x C-b.

list-buffers omits buffers whose names begin with a space, unless they visit files: such buffers are used internally by Emacs.