Mercurial > emacs
comparison man/buffers.texi @ 59884:7e4885de870d
(Select Buffer): Doc next-buffer and prev-buffer.
(List Buffers): Clarify.
(Several Buffers): Doc T command.
(Buffer Convenience): Clarify menu.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 03 Feb 2005 07:22:46 +0000 |
parents | c2bec3c79554 |
children | f13767c26b95 72cf6261961e |
comparison
equal
deleted
inserted
replaced
59883:286359935087 | 59884:7e4885de870d |
---|---|
65 @cindex switch buffers | 65 @cindex switch buffers |
66 | 66 |
67 @table @kbd | 67 @table @kbd |
68 @item C-x b @var{buffer} @key{RET} | 68 @item C-x b @var{buffer} @key{RET} |
69 Select or create a buffer named @var{buffer} (@code{switch-to-buffer}). | 69 Select or create a buffer named @var{buffer} (@code{switch-to-buffer}). |
70 @item C-x @key{LEFT} | |
71 Select the previous buffer in the list of existing buffers. | |
72 @item C-x @key{RIGHT} | |
73 Select the next buffer in the list of existing buffers. | |
70 @item C-x 4 b @var{buffer} @key{RET} | 74 @item C-x 4 b @var{buffer} @key{RET} |
71 Similar, but select @var{buffer} in another window | 75 Similar, but select @var{buffer} in another window |
72 (@code{switch-to-buffer-other-window}). | 76 (@code{switch-to-buffer-other-window}). |
73 @item C-x 5 b @var{buffer} @key{RET} | 77 @item C-x 5 b @var{buffer} @key{RET} |
74 Similar, but select @var{buffer} in a separate frame | 78 Similar, but select @var{buffer} in a separate frame |
81 @key{RET}}. This runs the command @code{switch-to-buffer} with argument | 85 @key{RET}}. This runs the command @code{switch-to-buffer} with argument |
82 @var{bufname}. You can use completion on an abbreviation for the buffer | 86 @var{bufname}. You can use completion on an abbreviation for the buffer |
83 name you want (@pxref{Completion}). An empty argument to @kbd{C-x b} | 87 name you want (@pxref{Completion}). An empty argument to @kbd{C-x b} |
84 specifies the buffer that was current most recently among those not | 88 specifies the buffer that was current most recently among those not |
85 now displayed in any window. | 89 now displayed in any window. |
90 | |
91 @kindex C-x @key{LEFT} | |
92 @kindex C-x @key{RIGHT} | |
93 @findex next-buffer | |
94 @findex prev-buffer | |
95 For conveniently switching between a few buffers, use the commands | |
96 @kbd{C-x @key{LEFT}} and @kbd{C-x @key{RIGHT}}. @kbd{C-x @key{RIGHT}} | |
97 (@code{prev-buffer}) selects the previous buffer (following the order | |
98 of most recent selection), while @kbd{C-x @key{LEFT}} | |
99 (@code{next-buffer}) moves through buffers in the reverse direction. | |
86 | 100 |
87 @kindex C-x 4 b | 101 @kindex C-x 4 b |
88 @findex switch-to-buffer-other-window | 102 @findex switch-to-buffer-other-window |
89 @vindex even-window-heights | 103 @vindex even-window-heights |
90 To select a buffer in a window other than the current one, type | 104 To select a buffer in a window other than the current one, type |
139 @end table | 153 @end table |
140 | 154 |
141 @cindex listing current buffers | 155 @cindex listing current buffers |
142 @kindex C-x C-b | 156 @kindex C-x C-b |
143 @findex list-buffers | 157 @findex list-buffers |
144 To display a list of all the buffers that exist, type @kbd{C-x C-b}. | 158 To display a list of existing buffers, type @kbd{C-x C-b}. Each |
145 Each line in the list shows one buffer's name, major mode and visited | 159 line in the list shows one buffer's name, major mode and visited file. |
146 file. The buffers are listed in the order that they were current; the | 160 The buffers are listed in the order that they were current; the |
147 buffers that were current most recently come first. | 161 buffers that were current most recently come first. |
148 | 162 |
149 @samp{*} in the first field of a line indicates the buffer is ``modified.'' | 163 @samp{*} in the first field of a line indicates the buffer is ``modified.'' |
150 If several buffers are modified, it may be time to save some with @kbd{C-x s} | 164 If several buffers are modified, it may be time to save some with @kbd{C-x s} |
151 (@pxref{Saving}). @samp{%} indicates a read-only buffer. @samp{.} marks the | 165 (@pxref{Saving}). @samp{%} indicates a read-only buffer. @samp{.} marks the |
169 not visiting any file. The buffer @code{src} was made by Dired on the | 183 not visiting any file. The buffer @code{src} was made by Dired on the |
170 directory @file{~/cvs/emacs/src/}. You can list only buffers that are | 184 directory @file{~/cvs/emacs/src/}. You can list only buffers that are |
171 visiting files by giving the command a prefix; for instance, by typing | 185 visiting files by giving the command a prefix; for instance, by typing |
172 @kbd{C-u C-x C-b}. | 186 @kbd{C-u C-x C-b}. |
173 | 187 |
174 @code{list-buffers} omits buffers whose name begins with a blank, | 188 @code{list-buffers} omits buffers whose names begin with a space, |
175 unless they visit files: such buffers are used internally by Emacs. | 189 unless they visit files: such buffers are used internally by Emacs. |
176 | 190 |
177 @need 2000 | 191 @need 2000 |
178 @node Misc Buffer | 192 @node Misc Buffer |
179 @section Miscellaneous Buffer Operations | 193 @section Miscellaneous Buffer Operations |
330 @findex buffer-menu-other-window | 344 @findex buffer-menu-other-window |
331 The command @code{buffer-menu} writes a list of all Emacs | 345 The command @code{buffer-menu} writes a list of all Emacs |
332 buffers@footnote{Buffers which don't visit files and whose names begin | 346 buffers@footnote{Buffers which don't visit files and whose names begin |
333 with a space are omitted: these are used internally by Emacs.} into the | 347 with a space are omitted: these are used internally by Emacs.} into the |
334 buffer @samp{*Buffer List*}, and selects that buffer in Buffer Menu | 348 buffer @samp{*Buffer List*}, and selects that buffer in Buffer Menu |
335 mode. The list in the @samp{*Buffer List*} buffer looks exactly as | 349 mode. |
336 described in @ref{List Buffers}. The buffer is read-only, and can be | 350 |
351 The buffer is read-only, and can be | |
337 changed only through the special commands described in this section. | 352 changed only through the special commands described in this section. |
338 The usual Emacs cursor motion commands can be used in the @samp{*Buffer | 353 The usual Emacs cursor motion commands can be used in the @samp{*Buffer |
339 List*} buffer. The following commands apply to the buffer described on | 354 List*} buffer. The following commands apply to the buffer described on |
340 the current line. | 355 the current line. |
341 | 356 |
409 Immediately select this line's buffer, and also display in other windows | 424 Immediately select this line's buffer, and also display in other windows |
410 any buffers previously marked with the @kbd{m} command. If you have not | 425 any buffers previously marked with the @kbd{m} command. If you have not |
411 marked any buffers, this command is equivalent to @kbd{1}. | 426 marked any buffers, this command is equivalent to @kbd{1}. |
412 @end table | 427 @end table |
413 | 428 |
414 All that @code{buffer-menu} does directly is create and switch to a | 429 There is also a command that affects the entire buffer list: |
415 suitable buffer, and turn on Buffer Menu mode. Everything else | 430 |
431 @table @kbd | |
432 @item T | |
433 Delete, or reinsert, lines for non-file buffers. This command toggles | |
434 the inclusion of such buffers in the buffer list. | |
435 @end table | |
436 | |
437 What @code{buffer-menu} actually does is create and switch to a | |
438 suitable buffer, and turn on Buffer Menu mode in it. Everything else | |
416 described above is implemented by the special commands provided in | 439 described above is implemented by the special commands provided in |
417 Buffer Menu mode. One consequence of this is that you can switch from | 440 Buffer Menu mode. One consequence of this is that you can switch from |
418 the @samp{*Buffer List*} buffer to another Emacs buffer, and edit there. | 441 the @samp{*Buffer List*} buffer to another Emacs buffer, and edit |
419 You can reselect the @samp{*Buffer List*} buffer later, to perform the | 442 there. You can reselect the @samp{*Buffer List*} buffer later, to |
420 operations already requested, or you can kill it, or pay no further | 443 perform the operations already requested, or you can kill it, or pay |
421 attention to it. | 444 no further attention to it. |
422 | 445 |
423 The only difference between @code{buffer-menu} and @code{list-buffers} | 446 The list in the @samp{*Buffer List*} buffer looks exactly like the |
424 is that @code{buffer-menu} switches to the @samp{*Buffer List*} buffer | 447 buffer list described in @ref{List Buffers}, because they really are |
425 in the selected window; @code{list-buffers} displays it in another | 448 the same. The only difference between @code{buffer-menu} and |
426 window. If you run @code{list-buffers} (that is, type @kbd{C-x C-b}) | 449 @code{list-buffers} is that @code{buffer-menu} switches to the |
427 and select the buffer list manually, you can use all of the commands | 450 @samp{*Buffer List*} buffer in the selected window; |
428 described here. | 451 @code{list-buffers} displays the same buffer in another window. If |
452 you run @code{list-buffers} (that is, type @kbd{C-x C-b}) and select | |
453 the buffer list manually, you can use all of the commands described | |
454 here. | |
429 | 455 |
430 Normally, the buffer @samp{*Buffer List*} is not updated automatically when | 456 Normally, the buffer @samp{*Buffer List*} is not updated automatically when |
431 buffers are created and killed; its contents are just text. If you have | 457 buffers are created and killed; its contents are just text. If you have |
432 created, deleted or renamed buffers, the way to update @samp{*Buffer | 458 created, deleted or renamed buffers, the way to update @samp{*Buffer |
433 List*} to show what you have done is to type @kbd{g} | 459 List*} to show what you have done is to type @kbd{g} |
504 | 530 |
505 This section describes several modes and features that make it more | 531 This section describes several modes and features that make it more |
506 convenient to switch between buffers. | 532 convenient to switch between buffers. |
507 | 533 |
508 @menu | 534 @menu |
509 * Uniquify:: Buffer names can contain directory parts. | 535 * Uniquify:: Making buffer names unique with directory parts. |
510 * Iswitchb:: Switching between buffers with substrings. | 536 * Iswitchb:: Switching between buffers with substrings. |
511 * Buffer Menus:: Configurable buffer menu. | 537 * Buffer Menus:: Configurable buffer menu. |
512 @end menu | 538 @end menu |
513 | 539 |
514 @node Uniquify | 540 @node Uniquify |