From 8aec9635cf47a89bf7cfd76f9f4c76c84ee54324 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Tue, 26 Dec 2023 16:48:35 +0100 Subject: [PATCH] ; Document buffer name completion narrowing by major mode --- doc/emacs/buffers.texi | 7 +++++-- doc/emacs/mini.texi | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi index b6aafe24b96..21e1609ee14 100644 --- a/doc/emacs/buffers.texi +++ b/doc/emacs/buffers.texi @@ -109,8 +109,11 @@ related commands, use @dfn{permissive completion with confirmation} for minibuffer completion: if you type @key{RET} when the minibuffer text names a nonexistent buffer, Emacs prints @samp{[Confirm]} and you must type a second @key{RET} to submit that buffer name. -@xref{Completion Exit}, for details. For other completion options and -features, see @ref{Completion Options}. +@xref{Completion Exit}, for details. You can restrict the list of +possible completions to only include buffers with a certain major mode +by typing @kbd{C-x n m} in the minibuffer. @xref{Narrow Completions}. +For other completion options and features, see @ref{Completion +Options}. If you specify a buffer that does not exist, @kbd{C-x b} creates a new, empty buffer that is not visiting any file, and selects it for diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 50def33b924..49983a411cf 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -678,10 +678,13 @@ read a symbol name from the minibuffer, such as @kbd{C-h f} and @kbd{C-h o} (@pxref{Name Help}), let you restrict the completions list with @kbd{C-x n m} to show only symbols with a given property. @xref{Symbol Properties,,,elisp,The Emacs Lisp Reference Manual}. -When the command does not provide a specific way of restricting -completion candidates, @kbd{C-x n m} prompts you for a regular -expression and narrows the completions list to only include candidates -which match that regular expression. @xref{Regexps}. +Similarly, commands that read a buffer name, such as @kbd{C-x b} +(@pxref{Select Buffer}), make @kbd{C-x n m} restrict the completions +list by candidate buffer major mode. When the command does not +provide a specific way of restricting completion candidates, @kbd{C-x +n m} prompts you for a regular expression and narrows the completions +list to only include candidates which match that regular expression. +@xref{Regexps}. When you narrow the completions list with @kbd{C-x n n} or with @kbd{C-x n m}, Emacs extends the completions heading line with a -- 2.39.5