diff options
| author | Chong Yidong | 2008-10-11 17:35:20 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-10-11 17:35:20 +0000 |
| commit | ea146ed84a034cdd601178a183b631fa6757a911 (patch) | |
| tree | d510d7f2c31a732c5c6e947a7bb770c43ed8846c | |
| parent | 89774b5f39bda0b0dc55e5d2b8f669390ae0bc95 (diff) | |
| download | emacs-ea146ed84a034cdd601178a183b631fa6757a911.tar.gz emacs-ea146ed84a034cdd601178a183b631fa6757a911.zip | |
(Buffers): Add xrefs to Mode Line and Lisp Interaction.
(Select Buffer): Mention use of minibuffer history. Describe default
value of default-major-mode. Mention that C-x 4 b selects the other
window.
(List Buffers): Document CRM indicators in the order they appear.
(Kill Buffer): Document new command kill-matching buffers.
(Several Buffers): Move explanation of the relationship between buffer
list and buffer menu to the top.
(Indirect Buffers): Document new variable clone-indirect-buffer-hook.
| -rw-r--r-- | doc/emacs/buffers.texi | 246 |
1 files changed, 119 insertions, 127 deletions
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index 4d8fa5ad51e..e16e1c93133 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi | |||
| @@ -13,32 +13,31 @@ directory listing. If you send a message with @kbd{C-x m}, a buffer named | |||
| 13 | @samp{*mail*} is used to hold the text of the message. When you ask for a | 13 | @samp{*mail*} is used to hold the text of the message. When you ask for a |
| 14 | command's documentation, that appears in a buffer called @samp{*Help*}. | 14 | command's documentation, that appears in a buffer called @samp{*Help*}. |
| 15 | 15 | ||
| 16 | Each buffer has a unique name, which can be of any length. When a | ||
| 17 | buffer is displayed in a window, its name is shown in the mode line | ||
| 18 | (@pxref{Mode Line}). The distinction between upper and lower case | ||
| 19 | matters in buffer names. Most buffers are made by visiting files, and | ||
| 20 | their names are derived from the files' names; however, you can also | ||
| 21 | create an empty buffer with any name you want. A newly started Emacs | ||
| 22 | has a buffer named @samp{*scratch*}, which is not associated with any | ||
| 23 | file and can be used for evaluating Lisp expressions in Emacs | ||
| 24 | (@pxref{Lisp Interaction}). | ||
| 25 | |||
| 16 | @cindex selected buffer | 26 | @cindex selected buffer |
| 17 | @cindex current buffer | 27 | @cindex current buffer |
| 18 | At any time, one and only one buffer is @dfn{current}. It is also | 28 | At any time, one and only one buffer is @dfn{current}. This is also |
| 19 | called the @dfn{selected buffer}. Often we say that a command operates on | 29 | called the @dfn{selected buffer}. We often say that a command |
| 20 | ``the buffer'' as if there were only one; but really this means that the | 30 | operates on ``the buffer''; this really means that the command |
| 21 | command operates on the current buffer (most commands do). | 31 | operates on the current buffer (most commands do). When there is only |
| 22 | 32 | one Emacs window, the buffer displayed in that window is current. | |
| 23 | When Emacs has multiple windows, each window has its own chosen | 33 | When there are multiple windows present, the buffer displayed in the |
| 24 | buffer and displays it; at any time, only one of the windows is | 34 | @dfn{selected window} is current. @xref{Windows}. |
| 25 | selected, and its chosen buffer is the current buffer. Each window's | 35 | |
| 26 | mode line normally displays the name of the window's chosen buffer | 36 | Each buffer records individually what file it is visiting (if any), |
| 27 | (@pxref{Windows}). | 37 | whether it is modified, and what major mode and minor modes are in |
| 28 | 38 | effect (@pxref{Major Modes}). Any Emacs variable can be made | |
| 29 | Each buffer has a name, which can be of any length, and you can select | 39 | @dfn{local to} a particular buffer, meaning its value in that buffer |
| 30 | any buffer by giving its name. Most buffers are made by visiting files, | 40 | can be different from the value in other buffers. @xref{Locals}. |
| 31 | and their names are derived from the files' names. But you can also create | ||
| 32 | an empty buffer with any name you want. A newly started Emacs has a buffer | ||
| 33 | named @samp{*scratch*} which can be used for evaluating Lisp expressions in | ||
| 34 | Emacs. The distinction between upper and lower case matters in buffer | ||
| 35 | names. | ||
| 36 | |||
| 37 | Each buffer records individually what file it is visiting, whether it is | ||
| 38 | modified, and what major mode and minor modes are in effect in it | ||
| 39 | (@pxref{Major Modes}). Any Emacs variable can be made @dfn{local to} a | ||
| 40 | particular buffer, meaning its value in that buffer can be different from | ||
| 41 | the value in other buffers. @xref{Locals}. | ||
| 42 | 41 | ||
| 43 | @cindex buffer size, maximum | 42 | @cindex buffer size, maximum |
| 44 | A buffer's size cannot be larger than some maximum, which is defined | 43 | A buffer's size cannot be larger than some maximum, which is defined |
| @@ -85,13 +84,22 @@ selected buffer other than the current buffer. | |||
| 85 | 84 | ||
| 86 | @kindex C-x b | 85 | @kindex C-x b |
| 87 | @findex switch-to-buffer | 86 | @findex switch-to-buffer |
| 88 | To select the buffer named @var{bufname}, type @kbd{C-x b @var{bufname} | 87 | To select the buffer named @var{bufname}, type @kbd{C-x b |
| 89 | @key{RET}}. This runs the command @code{switch-to-buffer} with argument | 88 | @var{bufname} @key{RET}}. This runs the command |
| 90 | @var{bufname}. You can use completion to enter the buffer | 89 | @code{switch-to-buffer} with argument @var{bufname}. While entering |
| 91 | name (@pxref{Completion}). An empty argument to @kbd{C-x b} | 90 | the buffer name, you can use the usual minibuffer completion and |
| 92 | specifies the buffer that was current most recently among those not | 91 | history commands (@pxref{Minibuffer}). An empty argument to @kbd{C-x |
| 92 | b} specifies the buffer that was current most recently among those not | ||
| 93 | now displayed in any window. | 93 | now displayed in any window. |
| 94 | 94 | ||
| 95 | If you specify a buffer that does not exist, @kbd{C-x b} creates a | ||
| 96 | new, empty buffer that is not visiting any file, and selects it for | ||
| 97 | editing. You can use such a buffer for making temporary notes. If | ||
| 98 | you try to save it, you are asked for the file name to use. The new | ||
| 99 | buffer's major mode is determined by the variable | ||
| 100 | @code{default-major-mode}; the default value is Fundamental mode. | ||
| 101 | @xref{Major Modes}. | ||
| 102 | |||
| 95 | @kindex C-x @key{LEFT} | 103 | @kindex C-x @key{LEFT} |
| 96 | @kindex C-x @key{RIGHT} | 104 | @kindex C-x @key{RIGHT} |
| 97 | @findex next-buffer | 105 | @findex next-buffer |
| @@ -106,19 +114,23 @@ of most recent selection in the current frame), while @kbd{C-x @key{LEFT}} | |||
| 106 | @findex switch-to-buffer-other-window | 114 | @findex switch-to-buffer-other-window |
| 107 | @vindex even-window-heights | 115 | @vindex even-window-heights |
| 108 | To select a buffer in a window other than the current one, type | 116 | To select a buffer in a window other than the current one, type |
| 109 | @kbd{C-x 4 b @var{bufname} @key{RET}}. This runs the command | 117 | @kbd{C-x 4 b} (@code{switch-to-buffer-other-window}). This prompts |
| 110 | @code{switch-to-buffer-other-window} which displays the buffer | 118 | for a buffer name using the minibuffer, displays that buffer in |
| 111 | @var{bufname} in another window. By default, if displaying the buffer | 119 | another window, and selects that window. By default, if displaying |
| 112 | causes two vertically adjacent windows to be displayed, the heights of | 120 | the buffer causes two vertically adjacent windows to be displayed, the |
| 113 | those windows are evened out; to countermand that and preserve the | 121 | heights of those windows are evened out; to countermand that and |
| 114 | window configuration, set the variable @code{even-window-heights} to | 122 | preserve the window configuration, set the variable |
| 115 | @code{nil}. | 123 | @code{even-window-heights} to @code{nil}. |
| 116 | 124 | ||
| 117 | @kindex C-x 5 b | 125 | @kindex C-x 5 b |
| 118 | @findex switch-to-buffer-other-frame | 126 | @findex switch-to-buffer-other-frame |
| 119 | Similarly, @kbd{C-x 5 b @var{buffer} @key{RET}} runs the command | 127 | Similarly, @kbd{C-x 5 b} (@code{switch-to-buffer-other-frame}) |
| 120 | @code{switch-to-buffer-other-frame} which selects a buffer in another | 128 | prompts for a buffer name, displays that buffer in another frame, and |
| 121 | frame. | 129 | selects that frame. |
| 130 | |||
| 131 | In addition, @kbd{C-x C-f}, and any other command for visiting a | ||
| 132 | file, can also be used to switch to an existing file-visiting buffer. | ||
| 133 | @xref{Visiting}. | ||
| 122 | 134 | ||
| 123 | @vindex display-buffer-reuse-frames | 135 | @vindex display-buffer-reuse-frames |
| 124 | You can control how certain buffers are handled by these commands by | 136 | You can control how certain buffers are handled by these commands by |
| @@ -130,31 +142,18 @@ addition, if the value of @code{display-buffer-reuse-frames} is | |||
| 130 | non-@code{nil}, and the buffer you want to switch to is already | 142 | non-@code{nil}, and the buffer you want to switch to is already |
| 131 | displayed in some frame, Emacs will just raise that frame. | 143 | displayed in some frame, Emacs will just raise that frame. |
| 132 | 144 | ||
| 133 | Most buffers are created by visiting files, or by Emacs commands that | 145 | @kbd{C-u M-g M-g}, that is @code{goto-line} with a plain prefix |
| 134 | want to display some text, but you can also create a buffer explicitly | 146 | argument, reads a number @var{n} using the minibuffer, selects the |
| 135 | by typing @kbd{C-x b @var{bufname} @key{RET}}. This makes a new, empty | 147 | most recently selected buffer other than the current buffer in another |
| 136 | buffer that is not visiting any file, and selects it for editing. Such | 148 | window, and then moves point to the beginning of line number @var{n} |
| 137 | buffers are used for making notes to yourself. If you try to save one, | 149 | in that buffer. This is mainly useful in a buffer that refers to line |
| 138 | you are asked for the file name to use. The new buffer's major mode is | 150 | numbers in another buffer: if point is on or just after a number, |
| 139 | determined by the value of @code{default-major-mode} (@pxref{Major | 151 | @code{goto-line} uses that number as the default for @var{n}. Note |
| 140 | Modes}). | 152 | that prefix arguments other than just @kbd{C-u} behave differently. |
| 141 | 153 | @kbd{C-u 4 M-g M-g} goes to line 4 in the @emph{current} buffer, | |
| 142 | Note that @kbd{C-x C-f}, and any other command for visiting a file, | 154 | without reading a number from the minibuffer. (Remember that @kbd{M-g |
| 143 | can also be used to switch to an existing file-visiting buffer. | 155 | M-g} without prefix argument reads a number @var{n} and then moves to |
| 144 | @xref{Visiting}. | 156 | line number @var{n} in the current buffer. @xref{Moving Point}.) |
| 145 | |||
| 146 | @kbd{C-u M-g M-g}, that is @code{goto-line} with a prefix argument | ||
| 147 | of just @kbd{C-u}, reads a number @var{n} using the minibuffer, | ||
| 148 | selects the most recently selected buffer other than the current | ||
| 149 | buffer in another window, and then moves point to the beginning of | ||
| 150 | line number @var{n} in that buffer. This is mainly useful in a buffer | ||
| 151 | that refers to line numbers in another buffer: if point is on or just | ||
| 152 | after a number, @code{goto-line} uses that number as the default for | ||
| 153 | @var{n}. Note that prefix arguments other than just @kbd{C-u} behave | ||
| 154 | differently. @kbd{C-u 4 M-g M-g} goes to line 4 in the @emph{current} | ||
| 155 | buffer, without reading a number from the minibuffer. (Remember that | ||
| 156 | @kbd{M-g M-g} without prefix argument reads a number @var{n} and then | ||
| 157 | moves to line number @var{n} in the current buffer.) | ||
| 158 | 157 | ||
| 159 | Emacs uses buffer names that start with a space for internal purposes. | 158 | Emacs uses buffer names that start with a space for internal purposes. |
| 160 | It treats these buffers specially in minor ways---for example, by | 159 | It treats these buffers specially in minor ways---for example, by |
| @@ -177,11 +176,11 @@ line in the list shows one buffer's name, major mode and visited file. | |||
| 177 | The buffers are listed in the order that they were current; the | 176 | The buffers are listed in the order that they were current; the |
| 178 | buffers that were current most recently come first. | 177 | buffers that were current most recently come first. |
| 179 | 178 | ||
| 180 | @samp{*} in the first field of a line indicates the buffer is | 179 | @samp{.} in the first field of a line indicates that the buffer is |
| 181 | ``modified.'' If several buffers are modified, it may be time to save | 180 | current. @samp{%} indicates a read-only buffer. @samp{*} indicates |
| 182 | some with @kbd{C-x s} (@pxref{Save Commands}). @samp{%} indicates a | 181 | that the buffer is ``modified.'' If several buffers are modified, it |
| 183 | read-only buffer. @samp{.} marks the current buffer. Here is an | 182 | may be time to save some with @kbd{C-x s} (@pxref{Save Commands}). |
| 184 | example of a buffer list:@refill | 183 | Here is an example of a buffer list: |
| 185 | 184 | ||
| 186 | @smallexample | 185 | @smallexample |
| 187 | CRM Buffer Size Mode File | 186 | CRM Buffer Size Mode File |
| @@ -197,16 +196,15 @@ CRM Buffer Size Mode File | |||
| 197 | @end smallexample | 196 | @end smallexample |
| 198 | 197 | ||
| 199 | @noindent | 198 | @noindent |
| 200 | Note that the buffer @samp{*Help*} was made by a help request; it is | 199 | The buffer @samp{*Help*} was made by a help request (@pxref{Help}); it |
| 201 | not visiting any file. The buffer @code{src} was made by Dired on the | 200 | is not visiting any file. The buffer @code{src} was made by Dired on |
| 202 | directory @file{~/cvs/emacs/src/}. You can list only buffers that are | 201 | the directory @file{~/cvs/emacs/src/}. You can list only buffers that |
| 203 | visiting files by giving the command a prefix argument, as in | 202 | are visiting files by giving the command a prefix argument, as in |
| 204 | @kbd{C-u C-x C-b}. | 203 | @kbd{C-u C-x C-b}. |
| 205 | 204 | ||
| 206 | @code{list-buffers} omits buffers whose names begin with a space, | 205 | @code{list-buffers} omits buffers whose names begin with a space, |
| 207 | unless they visit files: such buffers are used internally by Emacs. | 206 | unless they visit files: such buffers are used internally by Emacs. |
| 208 | 207 | ||
| 209 | @need 2000 | ||
| 210 | @node Misc Buffer | 208 | @node Misc Buffer |
| 211 | @section Miscellaneous Buffer Operations | 209 | @section Miscellaneous Buffer Operations |
| 212 | 210 | ||
| @@ -291,28 +289,37 @@ programs can use it. Here are some commands for killing buffers: | |||
| 291 | Kill buffer @var{bufname} (@code{kill-buffer}). | 289 | Kill buffer @var{bufname} (@code{kill-buffer}). |
| 292 | @item M-x kill-some-buffers | 290 | @item M-x kill-some-buffers |
| 293 | Offer to kill each buffer, one by one. | 291 | Offer to kill each buffer, one by one. |
| 292 | @item M-x kill-matching-buffers | ||
| 293 | Offer to kill all buffers matching a regular expression. | ||
| 294 | @end table | 294 | @end table |
| 295 | 295 | ||
| 296 | @findex kill-buffer | 296 | @findex kill-buffer |
| 297 | @findex kill-some-buffers | ||
| 298 | @kindex C-x k | 297 | @kindex C-x k |
| 299 | |||
| 300 | @kbd{C-x k} (@code{kill-buffer}) kills one buffer, whose name you | 298 | @kbd{C-x k} (@code{kill-buffer}) kills one buffer, whose name you |
| 301 | specify in the minibuffer. The default, used if you type just | 299 | specify in the minibuffer. The default, used if you type just |
| 302 | @key{RET} in the minibuffer, is to kill the current buffer. If you | 300 | @key{RET} in the minibuffer, is to kill the current buffer. If you |
| 303 | kill the current buffer, another buffer becomes current: one that was | 301 | kill the current buffer, another buffer becomes current: one that was |
| 304 | current in the recent past but is not displayed in any window now. If | 302 | current in the recent past but is not displayed in any window now. If |
| 305 | you ask to kill a file-visiting buffer that is modified (has unsaved | 303 | you ask to kill a file-visiting buffer that is modified, then you must |
| 306 | editing), then you must confirm with @kbd{yes} before the buffer is | 304 | confirm with @kbd{yes} before the buffer is killed. |
| 307 | killed. | ||
| 308 | |||
| 309 | The command @kbd{M-x kill-some-buffers} asks about each buffer, one by | ||
| 310 | one. An answer of @kbd{y} means to kill the buffer. Killing the current | ||
| 311 | buffer or a buffer containing unsaved changes selects a new buffer or asks | ||
| 312 | for confirmation just like @code{kill-buffer}. | ||
| 313 | 305 | ||
| 314 | The buffer menu feature (@pxref{Several Buffers}) is also convenient | 306 | @findex kill-some-buffers |
| 315 | for killing various buffers. | 307 | The command @kbd{M-x kill-some-buffers} asks about each buffer, one |
| 308 | by one. An answer of @kbd{y} means to kill the buffer, just like | ||
| 309 | @code{kill-buffer}. This command ignores buffers whose names begin | ||
| 310 | with a space, which are used internally by Emacs. | ||
| 311 | |||
| 312 | @findex kill-matching-buffers | ||
| 313 | The command @kbd{M-x kill-matching-buffers} prompts for a regular | ||
| 314 | expression and kills all buffers whose names match that expression. | ||
| 315 | @xref{Regexps}. Like @code{kill-some-buffers}, it asks for | ||
| 316 | confirmation before each kill. This command normally ignores buffers | ||
| 317 | whose names begin with a space, which are used internally by Emacs. | ||
| 318 | To kill internal buffers as well, call @code{kill-matching-buffers} | ||
| 319 | with a prefix argument. | ||
| 320 | |||
| 321 | The buffer menu feature is also convenient for killing various | ||
| 322 | buffers. @xref{Several Buffers}. | ||
| 316 | 323 | ||
| 317 | @vindex kill-buffer-hook | 324 | @vindex kill-buffer-hook |
| 318 | If you want to do something special every time a buffer is killed, you | 325 | If you want to do something special every time a buffer is killed, you |
| @@ -332,24 +339,17 @@ for a mere hour. | |||
| 332 | @vindex midnight-mode | 339 | @vindex midnight-mode |
| 333 | @vindex midnight-hook | 340 | @vindex midnight-hook |
| 334 | You can also have this buffer purging done for you, every day at | 341 | You can also have this buffer purging done for you, every day at |
| 335 | midnight, by enabling Midnight mode. Midnight mode operates each day at | 342 | midnight, by enabling Midnight mode. Midnight mode operates each day |
| 336 | midnight; at that time, it runs @code{clean-buffer-list}, or whichever | 343 | at midnight; at that time, it runs @code{clean-buffer-list}, or |
| 337 | functions you have placed in the normal hook @code{midnight-hook} | 344 | whichever functions you have placed in the normal hook |
| 338 | (@pxref{Hooks}). | 345 | @code{midnight-hook} (@pxref{Hooks}). To enable Midnight mode, use |
| 339 | 346 | the Customization buffer to set the variable @code{midnight-mode} to | |
| 340 | To enable Midnight mode, use the Customization buffer to set the | 347 | @code{t}. @xref{Easy Customization}. |
| 341 | variable @code{midnight-mode} to @code{t}. @xref{Easy Customization}. | ||
| 342 | 348 | ||
| 343 | @node Several Buffers | 349 | @node Several Buffers |
| 344 | @section Operating on Several Buffers | 350 | @section Operating on Several Buffers |
| 345 | @cindex buffer menu | 351 | @cindex buffer menu |
| 346 | 352 | ||
| 347 | The @dfn{buffer-menu} facility is like a ``Dired for buffers''; it allows | ||
| 348 | you to request operations on various Emacs buffers by editing an Emacs | ||
| 349 | buffer containing a list of them. You can save buffers, kill them | ||
| 350 | (here called @dfn{deleting} them, for consistency with Dired), or display | ||
| 351 | them. | ||
| 352 | |||
| 353 | @table @kbd | 353 | @table @kbd |
| 354 | @item M-x buffer-menu | 354 | @item M-x buffer-menu |
| 355 | Begin editing a buffer listing all Emacs buffers. | 355 | Begin editing a buffer listing all Emacs buffers. |
| @@ -357,19 +357,24 @@ Begin editing a buffer listing all Emacs buffers. | |||
| 357 | Similar, but do it in another window. | 357 | Similar, but do it in another window. |
| 358 | @end table | 358 | @end table |
| 359 | 359 | ||
| 360 | The @dfn{buffer menu} opened by @kbd{C-x C-b} (@pxref{List Buffers}) | ||
| 361 | does not merely list buffers. It also allows you to perform various | ||
| 362 | operations on buffers, through an interface similar to Dired | ||
| 363 | (@pxref{Dired}). You can save buffers, kill them (here called | ||
| 364 | @dfn{deleting} them, for consistency with Dired), or display them. | ||
| 365 | |||
| 360 | @findex buffer-menu | 366 | @findex buffer-menu |
| 361 | @findex buffer-menu-other-window | 367 | @findex buffer-menu-other-window |
| 362 | The command @code{buffer-menu} writes a list of all Emacs | 368 | To use the buffer menu, type @kbd{C-x C-b} and switch to the window |
| 363 | buffers@footnote{Buffers which don't visit files and whose names begin | 369 | displaying the @samp{*Buffer List*} buffer. You can also type |
| 364 | with a space are omitted: these are used internally by Emacs.} into the | 370 | @kbd{M-x buffer-menu} to open the buffer menu in the selected window. |
| 365 | buffer @samp{*Buffer List*}, and selects that buffer in Buffer Menu | 371 | Alternatively, the command @kbd{M-x buffer-menu-other-window} opens |
| 366 | mode. | 372 | the buffer menu in another window, and selects that window. |
| 367 | 373 | ||
| 368 | The buffer is read-only, and can be | 374 | The buffer menu is a read-only buffer, and can be changed only |
| 369 | changed only through the special commands described in this section. | 375 | through the special commands described in this section. The usual |
| 370 | The usual Emacs cursor motion commands can be used in the @samp{*Buffer | 376 | Emacs cursor motion commands can be used in this buffer. The |
| 371 | List*} buffer. The following commands apply to the buffer described on | 377 | following commands apply to the buffer described on the current line: |
| 372 | the current line. | ||
| 373 | 378 | ||
| 374 | @table @kbd | 379 | @table @kbd |
| 375 | @item d | 380 | @item d |
| @@ -460,16 +465,6 @@ there. You can reselect the @samp{*Buffer List*} buffer later, to | |||
| 460 | perform the operations already requested, or you can kill it, or pay | 465 | perform the operations already requested, or you can kill it, or pay |
| 461 | no further attention to it. | 466 | no further attention to it. |
| 462 | 467 | ||
| 463 | The list in the @samp{*Buffer List*} buffer looks exactly like the | ||
| 464 | buffer list described in @ref{List Buffers}, because they really are | ||
| 465 | the same. The only difference between @code{buffer-menu} and | ||
| 466 | @code{list-buffers} is that @code{buffer-menu} switches to the | ||
| 467 | @samp{*Buffer List*} buffer in the selected window; | ||
| 468 | @code{list-buffers} displays the same buffer in another window. If | ||
| 469 | you run @code{list-buffers} (that is, type @kbd{C-x C-b}) and select | ||
| 470 | the buffer list manually, you can use all of the commands described | ||
| 471 | here. | ||
| 472 | |||
| 473 | Normally, the buffer @samp{*Buffer List*} is not updated | 468 | Normally, the buffer @samp{*Buffer List*} is not updated |
| 474 | automatically when buffers are created and killed; its contents are | 469 | automatically when buffers are created and killed; its contents are |
| 475 | just text. If you have created, deleted or renamed buffers, the way | 470 | just text. If you have created, deleted or renamed buffers, the way |
| @@ -486,11 +481,6 @@ Auto Revert mode applies to the @samp{*Buffer List*} buffer only if | |||
| 486 | @xref{Autorevert, global-auto-revert-non-file-buffers}, for details. | 481 | @xref{Autorevert, global-auto-revert-non-file-buffers}, for details. |
| 487 | @end ifnottex | 482 | @end ifnottex |
| 488 | 483 | ||
| 489 | |||
| 490 | The command @code{buffer-menu-other-window} works the same as | ||
| 491 | @code{buffer-menu}, except that it displays the buffers list in | ||
| 492 | another window. | ||
| 493 | |||
| 494 | @node Indirect Buffers | 484 | @node Indirect Buffers |
| 495 | @section Indirect Buffers | 485 | @section Indirect Buffers |
| 496 | @cindex indirect buffer | 486 | @cindex indirect buffer |
| @@ -518,7 +508,7 @@ select it in another window (@code{clone-indirect-buffer-other-window}). | |||
| 518 | The text of the indirect buffer is always identical to the text of its | 508 | The text of the indirect buffer is always identical to the text of its |
| 519 | base buffer; changes made by editing either one are visible immediately | 509 | base buffer; changes made by editing either one are visible immediately |
| 520 | in the other. But in all other respects, the indirect buffer and its | 510 | in the other. But in all other respects, the indirect buffer and its |
| 521 | base buffer are completely separate. They have different names, | 511 | base buffer are completely separate. They can have different names, |
| 522 | different values of point, different narrowing, different markers, | 512 | different values of point, different narrowing, different markers, |
| 523 | different major modes, and different local variables. | 513 | different major modes, and different local variables. |
| 524 | 514 | ||
| @@ -530,6 +520,7 @@ buffer, but killing an indirect buffer has no effect on its base buffer. | |||
| 530 | One way to use indirect buffers is to display multiple views of an | 520 | One way to use indirect buffers is to display multiple views of an |
| 531 | outline. @xref{Outline Views}. | 521 | outline. @xref{Outline Views}. |
| 532 | 522 | ||
| 523 | @vindex clone-indirect-buffer-hook | ||
| 533 | A quick and handy way to make an indirect buffer is with the command | 524 | A quick and handy way to make an indirect buffer is with the command |
| 534 | @kbd{M-x clone-indirect-buffer}. It creates and selects an indirect | 525 | @kbd{M-x clone-indirect-buffer}. It creates and selects an indirect |
| 535 | buffer whose base buffer is the current buffer. With a numeric | 526 | buffer whose base buffer is the current buffer. With a numeric |
| @@ -537,7 +528,8 @@ argument, it prompts for the name of the indirect buffer; otherwise it | |||
| 537 | uses the name of the current buffer, with a @samp{<@var{n}>} suffix | 528 | uses the name of the current buffer, with a @samp{<@var{n}>} suffix |
| 538 | added. @kbd{C-x 4 c} (@code{clone-indirect-buffer-other-window}) | 529 | added. @kbd{C-x 4 c} (@code{clone-indirect-buffer-other-window}) |
| 539 | works like @kbd{M-x clone-indirect-buffer}, but it selects the new | 530 | works like @kbd{M-x clone-indirect-buffer}, but it selects the new |
| 540 | buffer in another window. | 531 | buffer in another window. These functions run the hook |
| 532 | @code{clone-indirect-buffer-hook} after creating the indirect buffer. | ||
| 541 | 533 | ||
| 542 | The more general way to make an indirect buffer is with the command | 534 | The more general way to make an indirect buffer is with the command |
| 543 | @kbd{M-x make-indirect-buffer}. It creates an indirect buffer from | 535 | @kbd{M-x make-indirect-buffer}. It creates an indirect buffer from |