From 3bcfb3f806c67ba5debf6765d5b7920ae880bfdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20Antol=C3=ADn?= Date: Mon, 4 Jan 2021 13:46:29 -0600 Subject: Generate texinfo manual from readme --- README.org | 5 + orderless.texi | 531 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 536 insertions(+) create mode 100644 orderless.texi diff --git a/README.org b/README.org index e0f5ab7..5136e2b 100644 --- a/README.org +++ b/README.org @@ -1,3 +1,8 @@ +#+EXPORT_FILE_NAME: orderless.texi +#+TEXINFO_DIR_CATEGORY: Emacs +#+TEXINFO_DIR_TITLE: Orderless: (orderless). +#+TEXINFO_DIR_DESC: Completion style for matching regexps in any order + [[https://melpa.org/#/orderless][file:https://melpa.org/packages/orderless-badge.svg]] [[https://stable.melpa.org/#/orderless][file:https://stable.melpa.org/packages/orderless-badge.svg]] diff --git a/orderless.texi b/orderless.texi new file mode 100644 index 0000000..eeed98a --- /dev/null +++ b/orderless.texi @@ -0,0 +1,531 @@ +\input texinfo @c -*- texinfo -*- +@c %**start of header +@setfilename orderless.info +@settitle +@documentencoding UTF-8 +@documentlanguage en +@c %**end of header + +@dircategory Emacs +@direntry +* Orderless: (orderless). Completion style for matching regexps in any order. +@end direntry + +@finalout +@titlepage +@title +@author Omar AntolĂ­n Camarena +@end titlepage + +@contents + +@ifnottex +@node Top +@top +@end ifnottex + +@menu +* Overview:: +* Customization:: +* Integration with other completion UIs:: +* Related packages:: + +@detailmenu +--- The Detailed Node Listing --- + +Customization + +* Component matching styles:: +* Component separator regexp:: +* Faces for component matches:: +* Pattern compiler:: +* Interactively changing the configuration:: + +Component matching styles + +* Style dispatchers:: + +Integration with other completion UIs + +* Ivy:: +* Selectrum:: +* Company:: + +Related packages + +* Ivy and Helm:: +* Prescient:: +* Restricting to current matches: Icicles, Ido and Ivy: Restricting to current matches Icicles Ido and Ivy. + +@end detailmenu +@end menu + +@node Overview +@chapter Overview + +This package provides an @samp{orderless} @emph{completion style} that divides the +pattern into space-separated components, 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 +initialism 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) or with the built-in Icomplete package (which is +similar to the more well-known Ido Mode). To use a completion style in +this fashion simply add it as an entry in the variables +@samp{completion-styles} and @samp{completion-category-overrides} (see their +documentation). + +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 +Emacs completion styles. Currently there is support for @uref{https://github.com/abo-abo/swiper, Ivy} and +@uref{https://github.com/raxod502/selectrum, Selectrum} (see below). + +If you use MELPA, the easiest way to install @samp{orderless} is via +@samp{package-install}. If you use both MELPA and @samp{use-package}, you can use: + +@lisp +(use-package orderless + :ensure t + :init (icomplete-mode) ; optional but recommended! + :custom (completion-styles '(orderless))) +@end lisp + +Alternatively, put @samp{orderless.el} somewhere on your @samp{load-path}, and use +the following configuration: + +@lisp +(require 'orderless) +(setq completion-styles '(orderless)) +(icomplete-mode) ; optional but recommended! +@end lisp + +(And of course, if you use another completion framework such as Ivy or +Helm, disable it.) + +If you like the experience of using @samp{orderless} with Icomplete, but wish +the candidates displayed vertically, you can use @uref{https://github.com/oantolin/icomplete-vertical, icomplete-vertical}. + +Bug reports are highly welcome and appreciated! + +See also the @uref{https://github.com/oantolin/orderless/, package webpage}, which includes a @uref{https://github.com/oantolin/orderless/#screenshot, screenshot}. + +@node Customization +@chapter Customization + +@menu +* Component matching styles:: +* Component separator regexp:: +* Faces for component matches:: +* Pattern compiler:: +* Interactively changing the configuration:: +@end menu + +@node Component matching styles +@section Component matching styles + +Each component of a pattern can match in any of several matching +styles. A matching style is simply a function from strings to strings +that maps a component to a regexp to match against, so it is easy to +define new matching styles. The predefined ones are: + +@table @asis +@item orderless-regexp +the component is treated as a regexp that must +match somewhere in the candidate. + +This is simply the identity function! + +@item orderless-literal +the component is treated as a literal string +that must occur in the candidate. + +This is just @samp{regexp-quote}. + +@item @strong{orderless-without-literal} +the component is a treated as a literal +string that must @strong{not} occur in the candidate. + +Note that nothing is highlighted for this matching style. You +probably don't want to use this style directly in +@samp{orderless-matching-styles} but with a style dispatcher instead. There +is an example in the section on style dispatchers. + +@item orderless-prefixes +the component is split at word endings and +each piece must match at a word boundary in the candidate, 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 +@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. + +This maps @samp{abc} to @samp{\