GNU Info

Info Node: (emacs)Buffers

(emacs)Buffers


Next: Windows Prev: Files Up: Top
Enter node , (file) or (file)node

Using Multiple Buffers
**********************

   The text you are editing in Emacs resides in an object called a
"buffer".  Each time you visit a file, a buffer is created to hold the
file's text.  Each time you invoke Dired, a buffer is created to hold
the directory listing.  If you send a message with `C-x m', a buffer
named `*mail*' is used to hold the text of the message.  When you ask
for a command's documentation, that appears in a buffer called `*Help*'.

   At any time, one and only one buffer is "current".  It is also
called the "selected buffer".  Often we say that a command operates on
"the buffer" as if there were only one; but really this means that the
command operates on the current buffer (most commands do).

   When Emacs has multiple windows, each window has its own chosen
buffer and displays it; at any time, only one of the windows is
selected, and its chosen buffer is the current buffer.  Each window's
mode line normally displays the name of the window's chosen buffer
(Note: Windows).

   Each buffer has a name, which can be of any length, and you can
select any buffer by giving its name.  Most buffers are made by
visiting files, and their names are derived from the files' names.  But
you can also create an empty buffer with any name you want.  A newly
started Emacs has a buffer named `*scratch*' which can be used for
evaluating Lisp expressions in Emacs.  The distinction between upper
and lower case matters in buffer names.

   Each buffer records individually what file it is visiting, whether
it is modified, and what major mode and minor modes are in effect in it
(Note: Major Modes).  Any Emacs variable can be made "local to" a
particular buffer, meaning its value in that buffer can be different
from the value in other buffers.  Note: Locals.

   A buffer's size cannot be larger than some maximum, which is defined
by the largest buffer position representable by the "Emacs integer"
data type.  This is because Emacs tracks buffer positions using that
data type.  For 32-bit machines, the largest buffer size is 128
megabytes.

Select Buffer
Creating a new buffer or reselecting an old one.
List Buffers
Getting a list of buffers that exist.
Misc Buffer
Renaming; changing read-onlyness; copying text.
Kill Buffer
Killing buffers you no longer need.
Several Buffers
How to go through the list of all buffers
and operate variously on several of them.
Indirect Buffers
An indirect buffer shares the text of another buffer.
Buffer Convenience
Convenience and customization features for
buffer handling.

automatically generated by info2www version 1.2.2.9