(lemacs.info)Select Buffer

Next: List Buffers Prev: Buffers Up: Buffers

Creating and Selecting Buffers

     Select or create a buffer named BUFFER (`switch-to-buffer').

`C-x 4 b BUFFER RET'
     Similar, but select a buffer named BUFFER in another window

`M-x switch-to-other-buffer N'
     Switch to the previous buffer.

   To select a buffer named BUFNAME, type `C-x b BUFNAME RET'.  This is
the command `switch-to-buffer' with argument BUFNAME.  You can use
completion on an abbreviation for the buffer name you want (*note
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 when you visit files, or use Emacs commands
that display text.  You can also create a buffer explicitly by typing
`C-x b BUFNAME RET', which creates a new, empty buffer that is not
visiting any file, and selects it for editing.  The new buffer's major
mode is determined by the value of `default-major-mode' (Note: Major
Modes.).  Buffers not visiting files are usually used for making
notes to yourself.  If you try to save one, you are asked for the file
name to use.

   The function `switch-to-buffer-other-screen' is similar to
`switch-to-buffer' except that it creates a new screen in which to
display the selected buffer.

   Use `M-x switch-to-other-buffer' to visit the previous buffer. If
you supply a positive integer N, the Nth most recent buffer is
displayed. If you supply an argument of 0, the current buffer is moved
to the bottom of the buffer stack.

   Note that you can also use `C-x C-f' and any other command for
visiting a file to switch buffers.  Note: Visiting.

automatically generated by info2www