diff options
| author | Eli Zaretskii | 2018-01-20 21:37:30 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-01-20 21:37:30 +0200 |
| commit | 854a1c0a61c8754beab95734db772298bc60cbea (patch) | |
| tree | 85575d50ff33ea5939b47e1965f6df1f0c714519 | |
| parent | cfc94fd245076ee0fba49083a55b08bbadfec4eb (diff) | |
| download | emacs-854a1c0a61c8754beab95734db772298bc60cbea.tar.gz emacs-854a1c0a61c8754beab95734db772298bc60cbea.zip | |
Improve "Buffers" in the user manual
Suggested by John Cummings <john@rootabega.net> in
emacs-manual-bugs@gnu.org:
* doc/emacs/buffers.texi (Select Buffer): Add cross-references to
"Windows" and "Frames".
(Misc Buffer, Kill Buffer): Use BUFFER consistently in commands
that accept buffer names.
(Select Buffer): Improve description of "M-g M-g". Improve
wording.
(Misc Buffer, Kill Buffer): Improve wording.
(Kill Buffer): Fix the response required by kill-some-buffers.
Mention customizable options that control what clean-buffer-list
does.
(Several Buffers): More detail about
'Buffer-menu-unmark-all-buffers'.
| -rw-r--r-- | doc/emacs/buffers.texi | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index 47ac8d4b05c..6a8e32bc84b 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi | |||
| @@ -81,7 +81,7 @@ Select the next buffer in the buffer list (@code{next-buffer}). | |||
| 81 | @item C-u M-g M-g | 81 | @item C-u M-g M-g |
| 82 | @itemx C-u M-g g | 82 | @itemx C-u M-g g |
| 83 | Read a number @var{n} and move to line @var{n} in the most recently | 83 | Read a number @var{n} and move to line @var{n} in the most recently |
| 84 | selected buffer other than the current buffer. | 84 | selected buffer other than the current buffer, in another window. |
| 85 | @end table | 85 | @end table |
| 86 | 86 | ||
| 87 | @kindex C-x b | 87 | @kindex C-x b |
| @@ -94,12 +94,12 @@ now displayed in any window. | |||
| 94 | 94 | ||
| 95 | While entering the buffer name, you can use the usual completion and | 95 | While entering the buffer name, you can use the usual completion and |
| 96 | history commands (@pxref{Minibuffer}). Note that @kbd{C-x b}, and | 96 | history commands (@pxref{Minibuffer}). Note that @kbd{C-x b}, and |
| 97 | related commands, use @dfn{permissive completion with confirmation} for | 97 | related commands, use @dfn{permissive completion with confirmation} |
| 98 | minibuffer completion: if you type @key{RET} immediately after | 98 | for minibuffer completion: if you type @key{RET} when the minibuffer |
| 99 | completing up to a nonexistent buffer name, Emacs prints | 99 | text names a nonexistent buffer, Emacs prints @samp{[Confirm]} and you |
| 100 | @samp{[Confirm]} and you must type a second @key{RET} to submit that | 100 | must type a second @key{RET} to submit that buffer name. |
| 101 | buffer name. @xref{Completion Exit}, for details. For other | 101 | @xref{Completion Exit}, for details. For other completion options and |
| 102 | completion options and features, see @ref{Completion Options}. | 102 | features, see @ref{Completion Options}. |
| 103 | 103 | ||
| 104 | If you specify a buffer that does not exist, @kbd{C-x b} creates a | 104 | If you specify a buffer that does not exist, @kbd{C-x b} creates a |
| 105 | new, empty buffer that is not visiting any file, and selects it for | 105 | new, empty buffer that is not visiting any file, and selects it for |
| @@ -124,18 +124,19 @@ direction. | |||
| 124 | 124 | ||
| 125 | @kindex C-x 4 b | 125 | @kindex C-x 4 b |
| 126 | @findex switch-to-buffer-other-window | 126 | @findex switch-to-buffer-other-window |
| 127 | To select a buffer in a window other than the current one, type | 127 | To select a buffer in a window other than the current one |
| 128 | @kbd{C-x 4 b} (@code{switch-to-buffer-other-window}). This prompts | 128 | (@pxref{Windows}), type @kbd{C-x 4 b} |
| 129 | for a buffer name using the minibuffer, displays that buffer in | 129 | (@code{switch-to-buffer-other-window}). This prompts for a buffer |
| 130 | another window, and selects that window. | 130 | name using the minibuffer, displays that buffer in another window, and |
| 131 | selects that window. | ||
| 131 | 132 | ||
| 132 | @kindex C-x 5 b | 133 | @kindex C-x 5 b |
| 133 | @findex switch-to-buffer-other-frame | 134 | @findex switch-to-buffer-other-frame |
| 134 | Similarly, @kbd{C-x 5 b} (@code{switch-to-buffer-other-frame}) | 135 | Similarly, @kbd{C-x 5 b} (@code{switch-to-buffer-other-frame}) |
| 135 | prompts for a buffer name, displays that buffer in another frame, and | 136 | prompts for a buffer name, displays that buffer in another frame |
| 136 | selects that frame. If the buffer is already being shown in a window | 137 | (@pxref{Frames}), and selects that frame. If the buffer is already |
| 137 | on another frame, Emacs selects that window and frame instead of | 138 | being shown in a window on another frame, Emacs selects that window |
| 138 | creating a new frame. | 139 | and frame instead of creating a new frame. |
| 139 | 140 | ||
| 140 | @xref{Displaying Buffers}, for how the @kbd{C-x 4 b} and @kbd{C-x 5 | 141 | @xref{Displaying Buffers}, for how the @kbd{C-x 4 b} and @kbd{C-x 5 |
| 141 | b} commands get the window and/or frame to display in. | 142 | b} commands get the window and/or frame to display in. |
| @@ -219,7 +220,7 @@ unless they visit files: such buffers are used internally by Emacs. | |||
| 219 | @table @kbd | 220 | @table @kbd |
| 220 | @item C-x C-q | 221 | @item C-x C-q |
| 221 | Toggle read-only status of buffer (@code{read-only-mode}). | 222 | Toggle read-only status of buffer (@code{read-only-mode}). |
| 222 | @item M-x rename-buffer @key{RET} @var{name} @key{RET} | 223 | @item M-x rename-buffer @key{RET} @var{buffer} @key{RET} |
| 223 | Change the name of the current buffer. | 224 | Change the name of the current buffer. |
| 224 | @item M-x rename-uniquely | 225 | @item M-x rename-uniquely |
| 225 | Rename the current buffer by adding @samp{<@var{number}>} to the end. | 226 | Rename the current buffer by adding @samp{<@var{number}>} to the end. |
| @@ -234,8 +235,9 @@ Scroll through buffer @var{buffer}. @xref{View Mode}. | |||
| 234 | its contents are not allowed. The mode line indicates read-only | 235 | its contents are not allowed. The mode line indicates read-only |
| 235 | buffers with @samp{%%} or @samp{%*} near the left margin. @xref{Mode | 236 | buffers with @samp{%%} or @samp{%*} near the left margin. @xref{Mode |
| 236 | Line}. Read-only buffers are usually made by subsystems such as Dired | 237 | Line}. Read-only buffers are usually made by subsystems such as Dired |
| 237 | and Rmail that have special commands to operate on the text; also by | 238 | and Rmail that have special commands to operate on the text. Visiting |
| 238 | visiting a file whose access control says you cannot write it. | 239 | a file whose access control says you cannot write it also makes the |
| 240 | buffer read-only. | ||
| 239 | 241 | ||
| 240 | @findex read-only-mode | 242 | @findex read-only-mode |
| 241 | @vindex view-read-only | 243 | @vindex view-read-only |
| @@ -282,13 +284,13 @@ large number of buffers. You may then find it convenient to @dfn{kill} | |||
| 282 | the buffers you no longer need. (Some other editors call this | 284 | the buffers you no longer need. (Some other editors call this |
| 283 | operation @dfn{close}, and talk about ``closing the buffer'' or | 285 | operation @dfn{close}, and talk about ``closing the buffer'' or |
| 284 | ``closing the file'' visited in the buffer.) On most operating | 286 | ``closing the file'' visited in the buffer.) On most operating |
| 285 | systems, killing a buffer releases its space back to the operating | 287 | systems, killing a buffer releases the memory Emacs used for the buffer |
| 286 | system so that other programs can use it. Here are some commands for | 288 | back to the operating system so that other programs can use it. Here |
| 287 | killing buffers: | 289 | are some commands for killing buffers: |
| 288 | 290 | ||
| 289 | @table @kbd | 291 | @table @kbd |
| 290 | @item C-x k @var{bufname} @key{RET} | 292 | @item C-x k @var{buffer} @key{RET} |
| 291 | Kill buffer @var{bufname} (@code{kill-buffer}). | 293 | Kill buffer @var{buffer} (@code{kill-buffer}). |
| 292 | @item M-x kill-some-buffers | 294 | @item M-x kill-some-buffers |
| 293 | Offer to kill each buffer, one by one. | 295 | Offer to kill each buffer, one by one. |
| 294 | @item M-x kill-matching-buffers | 296 | @item M-x kill-matching-buffers |
| @@ -307,7 +309,7 @@ confirm with @kbd{yes} before the buffer is killed. | |||
| 307 | 309 | ||
| 308 | @findex kill-some-buffers | 310 | @findex kill-some-buffers |
| 309 | The command @kbd{M-x kill-some-buffers} asks about each buffer, one | 311 | The command @kbd{M-x kill-some-buffers} asks about each buffer, one |
| 310 | by one. An answer of @kbd{y} means to kill the buffer, just like | 312 | by one. An answer of @kbd{yes} means to kill the buffer, just like |
| 311 | @code{kill-buffer}. This command ignores buffers whose names begin | 313 | @code{kill-buffer}. This command ignores buffers whose names begin |
| 312 | with a space, which are used internally by Emacs. | 314 | with a space, which are used internally by Emacs. |
| 313 | 315 | ||
| @@ -335,7 +337,9 @@ all the unmodified buffers that you have not used for a long time. An | |||
| 335 | ordinary buffer is killed if it has not been displayed for three days; | 337 | ordinary buffer is killed if it has not been displayed for three days; |
| 336 | however, you can specify certain buffers that should never be killed | 338 | however, you can specify certain buffers that should never be killed |
| 337 | automatically, and others that should be killed if they have been unused | 339 | automatically, and others that should be killed if they have been unused |
| 338 | for a mere hour. | 340 | for a mere hour. These defaults, and other aspects of this command's |
| 341 | behavior, can be controlled by customizing several options described | ||
| 342 | in the doc string of @code{clean-buffer-list}. | ||
| 339 | 343 | ||
| 340 | @cindex Midnight mode | 344 | @cindex Midnight mode |
| 341 | @vindex midnight-mode | 345 | @vindex midnight-mode |
| @@ -422,7 +426,9 @@ Move to the previous line and remove all flags on that line | |||
| 422 | @findex Buffer-menu-unmark-all-buffers | 426 | @findex Buffer-menu-unmark-all-buffers |
| 423 | @kindex M-DEL @r{(Buffer Menu)} | 427 | @kindex M-DEL @r{(Buffer Menu)} |
| 424 | Remove a particular flag from all lines | 428 | Remove a particular flag from all lines |
| 425 | (@code{Buffer-menu-unmark-all-buffers}). | 429 | (@code{Buffer-menu-unmark-all-buffers}). This asks for a single |
| 430 | character, and unmarks buffers marked with that character; typing | ||
| 431 | @key{RET} removes all marks. | ||
| 426 | 432 | ||
| 427 | @item U | 433 | @item U |
| 428 | @findex Buffer-menu-unmark-all | 434 | @findex Buffer-menu-unmark-all |