switch-to-buffer
).
switch-to-buffer-other-window
).
switch-to-buffer-other-frame
).
To select the buffer named bufname, type C-x b bufname
RET. This runs the command switch-to-buffer
with argument
bufname. You can use completion on an abbreviation for the buffer
name you want (see section Completion). An empty argument to C-x b
specifies the most recently selected buffer that is not displayed in any
window.
Most buffers are created by visiting files, or by Emacs commands that
want to display some text, but you can also create a buffer explicitly by
typing C-x b bufname RET. This makes a new, empty buffer which
is not visiting any file, and selects it for editing. Such buffers are
used for making notes to yourself. If you try to save one, you are asked
for the file name to use. The new buffer's major mode is determined by the
value of default-major-mode
(see section Major Modes).
Note that C-x C-f, and any other command for visiting a file, can also be used to switch to an existing file-visiting buffer. See section Visiting Files.
Emacs uses buffer names that start with a space for internal purposes. It treats these buffers specially in minor ways--for example, by default they do not record undo information. It is best to avoid using such buffer names yourself.