From b7954e5c6d39b4e59878311dd3ebfd4fdf2e511e Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Sat, 17 Jan 2026 18:48:29 +0100 Subject: Regen texi --- orderless.texi | 218 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 110 insertions(+), 108 deletions(-) diff --git a/orderless.texi b/orderless.texi index 74fc048..42ceaec 100644 --- a/orderless.texi +++ b/orderless.texi @@ -57,7 +57,7 @@ Related packages * Ivy and Helm:: * Prescient:: -* Restricting to current matches in Icicles, Ido and Ivy: Restricting to current matches in Icicles Ido and Ivy. +* Restricting to current matches in Icicles@comma{} Ido and Ivy:: @end detailmenu @end menu @@ -66,27 +66,27 @@ Related packages @chapter Overview This package provides an @samp{orderless} @emph{completion style} that divides the -pattern into space-separated components, and matches candidates that +pattern into space-separated components@comma{} and matches candidates that match all of the components in any order. Each component can match in -any one of several ways: literally, as a regexp, as an initialism, in -the flex style, or as multiple word prefixes. By default, regexp and +any one of several ways: literally@comma{} as a regexp@comma{} as an initialism@comma{} in +the flex style@comma{} or as multiple word prefixes. By default@comma{} regexp and literal matches are enabled. A completion style is a back-end for completion and is used from a front-end that provides a completion UI@. Any completion style can be used with the default Emacs completion UI (sometimes called minibuffer -tab completion), with the built-in Icomplete package (which is similar -to the more well-known Ido Mode), the icomplete-vertical variant from +tab completion)@comma{} with the built-in Icomplete package (which is similar +to the more well-known Ido Mode)@comma{} the icomplete-vertical variant from Emacs 28 (see the external @uref{https://github.com/oantolin/icomplete-vertical, icomplete-vertical} package to get that -functionality on earlier versions of Emacs), or with some third party +functionality on earlier versions of Emacs)@comma{} or with some third party minibuffer completion frameworks such as @uref{https://gitlab.com/protesilaos/mct, Mct} or @uref{https://github.com/minad/vertico, Vertico}. -All the completion UIs just mentioned are for minibuffer completion, +All the completion UIs just mentioned are for minibuffer completion@comma{} used when Emacs commands prompt the user in the minibuffer for some -input, but there is also completion at point in normal buffers, +input@comma{} but there is also completion at point in normal buffers@comma{} typically used for identifiers in programming languages. Completion styles can also be used for that purpose by completion at point UIs -such as @uref{https://github.com/minad/corfu, Corfu}, @uref{https://company-mode.github.io/, Company} or the function @samp{consult-completion-in-region} +such as @uref{https://github.com/minad/corfu, Corfu}@comma{} @uref{https://company-mode.github.io/, Company} or the function @samp{consult-completion-in-region} from @uref{https://github.com/minad/consult, Consult}. To use a completion style with any of the above mentioned completion @@ -96,45 +96,47 @@ their documentation). The @samp{completion-category-defaults} variable serves as a default value for @samp{completion-category-overrides}. If you want to use @samp{orderless} -exclusively, set both variables to @samp{nil}, but be aware that +exclusively@comma{} set both variables to @samp{nil}@comma{} but be aware that @samp{completion-category-defaults} is modified by packages at load time. -With a bit of effort, it might still be possible to use @samp{orderless} with -other completion UIs, even if those UIs don't support the standard +With a bit of effort@comma{} it might still be possible to use @samp{orderless} with +other completion UIs@comma{} even if those UIs don't support the standard Emacs completion styles. Currently there is support for @uref{https://github.com/abo-abo/swiper, Ivy} (see -below). Also, while Company does support completion styles directly, -pressing @samp{SPC} takes you out of completion, so comfortably using +below). Also@comma{} while Company does support completion styles directly@comma{} +pressing @samp{SPC} takes you out of completion@comma{} so comfortably using @samp{orderless} with it takes a bit of configuration (see below). -If you use ELPA or MELPA, the easiest way to install @samp{orderless} is via -@samp{package-install}. If you use @samp{use-package}, you can use: +If you use ELPA or MELPA@comma{} the easiest way to install @samp{orderless} is via +@samp{package-install}. If you use @samp{use-package}@comma{} you can use: @lisp (use-package orderless :ensure t :custom (completion-styles '(orderless basic)) - (completion-category-overrides '((file (styles basic partial-completion))))) + (completion-category-overrides '((file (styles partial-completion)))) + (completion-pcm-leading-wildcard t)) ;; Emacs 31: partial-completion behaves like substring @end lisp -Alternatively, put @samp{orderless.el} somewhere on your @samp{load-path}, and use +Alternatively@comma{} put @samp{orderless.el} somewhere on your @samp{load-path}@comma{} and use the following configuration: @lisp (require 'orderless) (setq completion-styles '(orderless basic) - completion-category-overrides '((file (styles basic partial-completion)))) + completion-category-overrides '((file (styles partial-completion))) + completion-pcm-leading-wildcard t) ;; Emacs 31: partial-completion behaves like substring @end lisp The @samp{basic} completion style is specified as fallback in addition to @samp{orderless} in order to ensure that completion commands which rely on -dynamic completion tables, e.g., @code{completion-table-dynamic} or -@code{completion-table-in-turn}, work correctly. Furthermore the @samp{basic} +dynamic completion tables@comma{} e.g.@comma{} @code{completion-table-dynamic} or +@code{completion-table-in-turn}@comma{} work correctly. Furthermore the @samp{basic} completion style needs to be tried @emph{first} (not as a fallback) for TRAMP -hostname completion to work. In order to achieve that, we add an entry +hostname completion to work. In order to achieve that@comma{} we add an entry for the @samp{file} completion category in the @samp{completion-category-overrides} -variable. In addition, the @samp{partial-completion} style allows you to use -wildcards for file completion and partial paths, e.g., @code{/u/s/l} for +variable. In addition@comma{} the @samp{partial-completion} style allows you to use +wildcards for file completion and partial paths@comma{} e.g.@comma{} @code{/u/s/l} for @code{/usr/share/local}. Bug reports are highly welcome and appreciated! @@ -156,8 +158,8 @@ Bug reports are highly welcome and appreciated! Each component of a pattern can match in any of several matching styles. A matching style is a function from strings to regexps or -predicates, so it is easy to define new matching styles. The value -returned by a matching style can be either a regexp as a string, an +predicates@comma{} so it is easy to define new matching styles. The value +returned by a matching style can be either a regexp as a string@comma{} an s-expression in @samp{rx} syntax or a predicate function. The predefined matching styles are: @@ -166,7 +168,7 @@ matching styles are: the component is treated as a regexp that must match somewhere in the candidate. -If the component is not a valid regexp, it is ignored. +If the component is not a valid regexp@comma{} it is ignored. @item orderless-literal the component is treated as a literal string @@ -178,22 +180,22 @@ string that must occur as a prefix of a candidate. @item orderless-prefixes the component is split at word endings and -each piece must match at a word boundary in the candidate, occurring +each piece must match at a word boundary in the candidate@comma{} occurring in that order. This is similar to the built-in @samp{partial-completion} completion-style. -For example, @samp{re-re} matches @samp{query-replace-regexp}, @samp{recode-region} and +For example@comma{} @samp{re-re} matches @samp{query-replace-regexp}@comma{} @samp{recode-region} and @samp{magit-remote-list-refs}; @samp{f-d.t} matches @samp{final-draft.txt}. @item orderless-initialism each character of the component should appear -as the beginning of a word in the candidate, in order. +as the beginning of a word in the candidate@comma{} in order. This maps @samp{abc} to @samp{\