diff options
| author | Richard M. Stallman | 2001-02-17 13:51:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-02-17 13:51:18 +0000 |
| commit | 564ee37bd23aafed06923bb36877bbab4cbc664b (patch) | |
| tree | c751222949bb982c1c91916b9841269837303956 | |
| parent | 595ded7377f4ceb3d93b7d46a71751e388428f5b (diff) | |
| download | emacs-564ee37bd23aafed06923bb36877bbab4cbc664b.tar.gz emacs-564ee37bd23aafed06923bb36877bbab4cbc664b.zip | |
Major rewrite of Uniquify node and Iswitchb node.
Reorder info about indirect buffers, and clarify.
Put BS and MSB together in one node, Buffer Menus.
Don't mention kill-read-only-ok here.
Misc. clarifications.
| -rw-r--r-- | man/buffers.texi | 171 |
1 files changed, 90 insertions, 81 deletions
diff --git a/man/buffers.texi b/man/buffers.texi index 71dcde881dd..fa2f1ba736d 100644 --- a/man/buffers.texi +++ b/man/buffers.texi | |||
| @@ -134,10 +134,11 @@ selected buffer. Here is an example of a buffer list:@refill | |||
| 134 | @end smallexample | 134 | @end smallexample |
| 135 | 135 | ||
| 136 | @noindent | 136 | @noindent |
| 137 | Note that the buffer @samp{*Help*} was made by a help request; it is not | 137 | Note that the buffer @samp{*Help*} was made by a help request; it is |
| 138 | visiting any file. The buffer @code{man} was made by Dired on the | 138 | not visiting any file. The buffer @code{man} was made by Dired on the |
| 139 | directory @file{/u2/emacs/man/}. You can list buffers visiting files | 139 | directory @file{/u2/emacs/man/}. You can list only buffers that are |
| 140 | only by giving the command a prefix, i.e. type @kbd{C-u C-x C-b}. | 140 | visiting files by giving the command a prefix; for instance, by typing |
| 141 | @kbd{C-u C-x C-b}. | ||
| 141 | 142 | ||
| 142 | @need 2000 | 143 | @need 2000 |
| 143 | @node Misc Buffer | 144 | @node Misc Buffer |
| @@ -159,13 +160,11 @@ Scroll through buffer @var{buffer}. | |||
| 159 | @vindex buffer-read-only | 160 | @vindex buffer-read-only |
| 160 | @cindex read-only buffer | 161 | @cindex read-only buffer |
| 161 | A buffer can be @dfn{read-only}, which means that commands to change | 162 | A buffer can be @dfn{read-only}, which means that commands to change |
| 162 | its contents are not allowed. The mode line indicates read-only buffers | 163 | its contents are not allowed. The mode line indicates read-only |
| 163 | with @samp{%%} or @samp{%*} near the left margin. Read-only buffers are | 164 | buffers with @samp{%%} or @samp{%*} near the left margin. Read-only |
| 164 | usually made by subsystems such as Dired and Rmail that have special | 165 | buffers are usually made by subsystems such as Dired and Rmail that |
| 165 | commands to operate on the text; also by visiting a file whose access | 166 | have special commands to operate on the text; also by visiting a file |
| 166 | control says you cannot write it. However, if the variable | 167 | whose access control says you cannot write it. |
| 167 | @code{kill-read-only-ok} is set to a non-@code{nil} value, you can kill | ||
| 168 | (a.k.a.@: cut) read-only text, see @ref{Killing}. | ||
| 169 | 168 | ||
| 170 | If you wish to make changes in a read-only buffer, use the command | 169 | If you wish to make changes in a read-only buffer, use the command |
| 171 | @kbd{C-x C-q} (@code{vc-toggle-read-only}). It makes a read-only buffer | 170 | @kbd{C-x C-q} (@code{vc-toggle-read-only}). It makes a read-only buffer |
| @@ -425,21 +424,22 @@ buffer, but killing an indirect buffer has no effect on its base buffer. | |||
| 425 | One way to use indirect buffers is to display multiple views of an | 424 | One way to use indirect buffers is to display multiple views of an |
| 426 | outline. @xref{Outline Views}. | 425 | outline. @xref{Outline Views}. |
| 427 | 426 | ||
| 428 | The command @kbd{M-x make-indirect-buffer} creates an indirect buffer | ||
| 429 | whose name is @var{indirect-name} and whose text is identical to that of | ||
| 430 | the buffer @var{base-buffer}. It prompts for both @var{base-buffer} and | ||
| 431 | @var{indirect-name}. | ||
| 432 | |||
| 433 | @cindex multiple @samp{*info*} and @samp{*Help*} buffers | 427 | @cindex multiple @samp{*info*} and @samp{*Help*} buffers |
| 434 | The command @kbd{M-x clone-indirect-buffer} creates an indirect buffer | 428 | A quick and handy way to make an indirect buffer is with the command |
| 435 | whose base buffer is the current buffer, and also selects the | 429 | @kbd{M-x clone-indirect-buffer}. It creates and selects an indirect |
| 436 | newly-created indirect buffer. With a numeric argument, it prompts for | 430 | buffer whose base buffer is the current buffer. With a numeric |
| 437 | the name of the indirect buffer; otherwise it defaults to the name of | 431 | argument, it prompts for the name of the indirect buffer; otherwise it |
| 438 | the current buffer, modifying it by adding a @samp{<@var{n}>} prefix if | 432 | defaults to the name of the current buffer, modifying it by adding a |
| 439 | required. @kbd{C-x 4 c} (@code{clone-indirect-buffer-other-window}) | 433 | @samp{<@var{n}>} prefix if required. @kbd{C-x 4 c} |
| 440 | works like @kbd{M-x clone-indirect-buffer}, but it selects the cloned | 434 | (@code{clone-indirect-buffer-other-window}) works like @kbd{M-x |
| 441 | buffer in another window. These commands come in handy if you want to | 435 | clone-indirect-buffer}, but it selects the cloned buffer in another |
| 442 | create new @samp{*info*} or @samp{*Help*} buffers, for example. | 436 | window. These commands come in handy if you want to create new |
| 437 | @samp{*info*} or @samp{*Help*} buffers, for example. | ||
| 438 | |||
| 439 | The more general way is with the command @kbd{M-x | ||
| 440 | make-indirect-buffer}. It creates an indirect buffer from buffer | ||
| 441 | @var{base-buffer}, under the name @var{indirect-name}. It prompts for | ||
| 442 | both @var{base-buffer} and @var{indirect-name} using the minibuffer. | ||
| 443 | 443 | ||
| 444 | @node Buffer Convenience | 444 | @node Buffer Convenience |
| 445 | @section Convenience Features and Customization of Buffer Handling | 445 | @section Convenience Features and Customization of Buffer Handling |
| @@ -447,29 +447,46 @@ create new @samp{*info*} or @samp{*Help*} buffers, for example. | |||
| 447 | @menu | 447 | @menu |
| 448 | * Uniquify:: Buffer names can contain directory parts. | 448 | * Uniquify:: Buffer names can contain directory parts. |
| 449 | * Iswitchb:: Switching between buffers with substrings. | 449 | * Iswitchb:: Switching between buffers with substrings. |
| 450 | * BS:: Configurable buffer menu. | 450 | * Buffer Menus:: Configurable buffer menu. |
| 451 | * MSB:: Customizing the Mouse Buffer Selection Menus. | ||
| 452 | @end menu | 451 | @end menu |
| 453 | 452 | ||
| 454 | @node Uniquify | 453 | @node Uniquify |
| 455 | @subsection Directory Names in Buffer Names | 454 | @subsection Making Buffer Names Unique |
| 456 | 455 | ||
| 457 | @findex toggle-uniquify-buffer-names | ||
| 458 | @vindex uniquify-buffer-name-style | ||
| 459 | @cindex unique buffer names | 456 | @cindex unique buffer names |
| 460 | @cindex directories in buffer names | 457 | @cindex directories in buffer names |
| 461 | Emacs's standard method for making buffer names unique adds @samp{<2>}, | 458 | When several buffers visit identically-named files, Emacs must give |
| 462 | @samp{<3>}, etc. to the end of (all but one of) the buffers. The | 459 | the buffers distinct names. The usual method for making buffer names |
| 463 | Uniquify package replaces that behavior, for buffers visiting files and | 460 | unique adds @samp{<2>}, @samp{<3>}, etc. to the end of the buffer |
| 464 | dired buffers. It implements a uniquification that adds parts of the | 461 | names (all but one of them). |
| 465 | file name until the buffer names are unique. For instance, buffers | 462 | |
| 466 | visiting @file{/u/mernst/tmp/Makefile} and | 463 | @vindex uniquify-buffer-name-style |
| 467 | @file{/usr/projects/zaphod/Makefile} would be named @samp{tmp/Makefile} | 464 | Other methods work by adding parts of each file's directory to the |
| 468 | and @samp{zaphod/Makefile}, respectively (instead of @samp{Makefile} | 465 | buffer name. To select one, customize the variable |
| 469 | and @samp{Makefile<2>}). You can turn on this mode and select other | 466 | @code{uniquify-buffer-name-style} (@pxref{Easy Customization}). |
| 470 | buffer name styles by customizing the user option | 467 | |
| 471 | @code{uniquify-buffer-name-style}. The command @kbd{M-x | 468 | For instance, the @code{forward} naming method puts part of the |
| 472 | toggle-uniquify-buffer-names} can also be used to toggle the mode. | 469 | directory name at the beginning of the buffer name; using this method, |
| 470 | buffers visiting @file{/u/mernst/tmp/Makefile} and | ||
| 471 | @file{/usr/projects/zaphod/Makefile} would be named | ||
| 472 | @samp{tmp/Makefile} and @samp{zaphod/Makefile}, respectively (instead | ||
| 473 | of @samp{Makefile} and @samp{Makefile<2>}). | ||
| 474 | |||
| 475 | By contrast, the @code{post-forward} naming method would call the | ||
| 476 | buffers @samp{Makefile|tmp} and @samp{Makefile|zaphod}, and the | ||
| 477 | @code{reverse} naming method would call them @samp{Makefile\tmp} and | ||
| 478 | @samp{Makefile\zaphod}. The nontrivial difference between | ||
| 479 | @code{post-forward} and @code{reverse} occurs when just one directory | ||
| 480 | name is not enough to distinguish two files; then @code{reverse} puts | ||
| 481 | the directory names in reverse order, so that @file{/top/middle/file} | ||
| 482 | becomes @samp{file\middle\top}, while @code{post-forward} puts them in | ||
| 483 | forward order after the file name, as in @samp{file|top/middle}. | ||
| 484 | |||
| 485 | Which rule to follow for putting the directory names in the buffer | ||
| 486 | name is not very important if you are going to @emph{look} at the | ||
| 487 | buffer names before you type one. But as an experienced user, if you | ||
| 488 | know the rule, you won't have to look. And then you may find that one | ||
| 489 | rule or another is easier for you to remember and utilize fast. | ||
| 473 | 490 | ||
| 474 | @node Iswitchb | 491 | @node Iswitchb |
| 475 | @subsection Switching Between Buffers using Substrings | 492 | @subsection Switching Between Buffers using Substrings |
| @@ -482,59 +499,51 @@ toggle-uniquify-buffer-names} can also be used to toggle the mode. | |||
| 482 | @kindex C-x 5 b @r{(Iswitchb mode)} | 499 | @kindex C-x 5 b @r{(Iswitchb mode)} |
| 483 | @kindex C-x 4 C-o @r{(Iswitchb mode)} | 500 | @kindex C-x 4 C-o @r{(Iswitchb mode)} |
| 484 | 501 | ||
| 485 | Iswitchb global minor mode provides convenient switching between buffers | 502 | Iswitchb global minor mode provides convenient switching between |
| 486 | using substrings of their names by replacing the normal keybindings | 503 | buffers using substrings of their names. It replaces the normal |
| 487 | @kbd{C-x b}, @kbd{C-x 4 b}, @kbd{C-x 5 b} and @kbd{C-x 4 C-o}. | 504 | definitions of @kbd{C-x b}, @kbd{C-x 4 b}, @kbd{C-x 5 b}, and @kbd{C-x |
| 505 | 4 C-o} with alternative commands that are somewhat ``smarter.'' | ||
| 488 | 506 | ||
| 489 | When you are prompted for a buffer name, as you type in a substring the | 507 | When one of these commands prompts you for a buffer name, you can |
| 490 | list of buffers currently matching it is displayed as you type, with the | 508 | type in just a substring of the name you want to choose. As you enter |
| 491 | most recent buffers visited towards the start of the list. The buffer | 509 | the substring, Iswitchb mode continuously displays a list of buffers |
| 492 | at the start will be the one visited when you press @key{RET}. By | 510 | that match the substring you have typed. |
| 493 | typing more of the substring, the list is narrowed down so that | ||
| 494 | gradually the buffer you want will be at the top of the list. | ||
| 495 | Alternatively, you can use @kbd{C-s} and @kbd{C-r} to rotate buffer | ||
| 496 | names in the list until the one you want is at the top of the list. | ||
| 497 | Completion is available so that you can see what is common to all of the | ||
| 498 | matching buffers as you type. | ||
| 499 | 511 | ||
| 500 | @node BS | 512 | At any time, you can type @key{RET} to select the first buffer in |
| 501 | @subsection Configurable Buffer Menus | 513 | the list. So the way to select a particular buffer is to make it the |
| 514 | first in the list. There are two ways to do this. You can type more | ||
| 515 | of the buffer name and thus narrow down the list, excluding unwanted | ||
| 516 | buffers above the desired one. Alternatively, you can use @kbd{C-s} | ||
| 517 | and @kbd{C-r} to rotate the list until the desired buffer is first. | ||
| 518 | |||
| 519 | @key{TAB} while entering the buffer name performs completion on the | ||
| 520 | string you have entered, based on the displayed list of buffers. | ||
| 521 | |||
| 522 | @node Buffer Menus | ||
| 523 | @subsection Customizing Buffer Menus | ||
| 502 | 524 | ||
| 503 | @findex bs-show | 525 | @findex bs-show |
| 504 | @findex bs-cycle-next | ||
| 505 | @findex bs-cycle-previous | ||
| 506 | @cindex buffer list, customizable | 526 | @cindex buffer list, customizable |
| 507 | @table @kbd | 527 | @table @kbd |
| 508 | @item M-x bs-show | 528 | @item M-x bs-show |
| 509 | Make a list of buffers similarly to @kbd{M-x list-buffers} but | 529 | Make a list of buffers similarly to @kbd{M-x list-buffers} but |
| 510 | customizable. | 530 | customizable. |
| 511 | @item M-x bs-cycle-next | ||
| 512 | Cycle to the next buffer in the configuration. | ||
| 513 | @item M-x bs-cycle-previous | ||
| 514 | Cycle to the previous buffer in the configuration. | ||
| 515 | @end table | 531 | @end table |
| 516 | 532 | ||
| 517 | @kbd{M-x bs-show} pops up a buffer list similar to the one normally | 533 | @kbd{M-x bs-show} pops up a buffer list similar to the one normally |
| 518 | displayed by @kbd{C-x C-b} but which can be customized. You might like | 534 | displayed by @kbd{C-x C-b} but which you can customize. If you prefer |
| 519 | to bind it to @kbd{C-x C-b}. You can customize the display, for | 535 | this to the usual buffer list, you can bind this command to @kbd{C-x |
| 520 | instance to display a subset of buffers, in the @code{bs} Custom group. | 536 | C-b}. To customize this buffer list, use the @code{bs} Custom group |
| 521 | A special subset of all buffers is available---for instance avoiding | 537 | (@pxref{Easy Customization}). |
| 522 | ones like @samp{*Messages*}---through which you can cycle with @kbd{M-x | ||
| 523 | bs-cycle-next} and @kbd{M-x bs-cycle-previous}. Those commands could be | ||
| 524 | bound to convenient keys. | ||
| 525 | |||
| 526 | @node MSB | ||
| 527 | @subsection Customizing the Mouse Buffer Selection Menus | ||
| 528 | 538 | ||
| 529 | @findex msb-mode | 539 | @findex msb-mode |
| 530 | @cindex mode, MSB | 540 | @cindex mode, MSB |
| 531 | @cindex MSB mode | 541 | @cindex MSB mode |
| 532 | @cindex buffer menu | 542 | @cindex buffer menu |
| 533 | @findex mouse-buffer-menu | 543 | @findex mouse-buffer-menu |
| 534 | @kindex C-down-mouse-1 | 544 | @kindex C-Down-Mouse-1 |
| 535 | 545 | MSB global minor mode (``MSB'' stands for ``mouse select buffer'') | |
| 536 | MSB global minor mode provides a different and customizable mouse buffer | 546 | provides a different and customizable mouse buffer menu which you may |
| 537 | menu which you may prefer. It replaces the bindings of | 547 | prefer. It replaces the bindings of @code{mouse-buffer-menu}, |
| 538 | @code{mouse-buffer-menu}, normally on @kbd{C-down-mouse-1}, and the menu | 548 | normally on @kbd{C-Down-Mouse-1}, and the menu bar buffer menu. You |
| 539 | bar buffer menu. You can customize the menu in the @code{msb} Custom | 549 | can customize the menu in the @code{msb} Custom group. |
| 540 | group. | ||