[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless 8e28b74aab 147/204: Update information about
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless 8e28b74aab 147/204: Update information about Selectrum |
Date: |
Tue, 11 Jan 2022 12:58:25 -0500 (EST) |
branch: externals/orderless
commit 8e28b74aab66e9ae47a92098215a73f47c17595f
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Update information about Selectrum
---
README.org | 22 ++++++++++-------
orderless.texi | 77 +++++++++++++++++++---------------------------------------
2 files changed, 38 insertions(+), 61 deletions(-)
diff --git a/README.org b/README.org
index 03a569a299..1d45a73012 100644
--- a/README.org
+++ b/README.org
@@ -25,16 +25,16 @@ 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
-=completion-styles= and =completion-category-overrides= (see their
-documentation).
+tab completion), with the built-in Icomplete package (which is similar
+to the more well-known Ido Mode), or with some third party completion
+frameworks such as [[https://github.com/raxod502/selectrum][Selectrum]]. To
use a completion style in this
+fashion simply add it as an entry in the variables =completion-styles=
+and =completion-category-overrides= (see their documentation).
With a bit of effort, it might still be possible to use =orderless= with
other completion UIs, even if those UIs don't support the standard
-Emacs completion styles. Currently there is support for
[[https://github.com/abo-abo/swiper][Ivy]] and
-[[https://github.com/raxod502/selectrum][Selectrum]] (see below).
+Emacs completion styles. Currently there is support for
[[https://github.com/abo-abo/swiper][Ivy]] (see
+below).
If you use MELPA, the easiest way to install =orderless= is via
=package-install=. If you use both MELPA and =use-package=, you can use:
@@ -303,14 +303,18 @@ To use =orderless= from Ivy add this to your Ivy
configuration:
** Selectrum
-To use =orderless= from Selectrum add this to your Selectrum
-configuration:
+Recent versions of Selectrum default to using whatever completion
+styles you have configured. You can use =orderless= that way, or you can
+use this configuration:
#+begin_src emacs-lisp
(setq selectrum-refine-candidates-function #'orderless-filter)
(setq selectrum-highlight-candidates-function #'orderless-highlight-matches)
#+end_src
+If you use the above configuration, only the visible candidates are
+highlighted, which is a litte more efficient.
+
** Company
Company comes with a =company-capf= backend that uses the
diff --git a/orderless.texi b/orderless.texi
index d5361c7ac3..c3dac6d0c7 100644
--- a/orderless.texi
+++ b/orderless.texi
@@ -73,16 +73,16 @@ 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).
+tab completion), with the built-in Icomplete package (which is similar
+to the more well-known Ido Mode), or with some third party completion
+frameworks such as @uref{https://github.com/raxod502/selectrum, Selectrum}. 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).
+Emacs completion styles. Currently there is support for
@uref{https://github.com/abo-abo/swiper, Ivy} (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:
@@ -309,61 +309,31 @@ lists to use instead of @samp{orderless-matching-styles}.
@section Interactively changing the configuration
You might want to change the separator or the matching style
-configuration on the fly while matching. There many possible UIs for
-this: you could toggle between two chosen configurations, cycle among
-several, have a keymap where each key sets a different configurations,
-have a set of named configurations and be prompted (with completion)
-for one of them, popup a @uref{https://github.com/abo-abo/hydra, hydra} to
choose a configuration, etc.
-
-Rather than include commands for any of those on-the-fly configuration
-changes, @samp{orderless} provides a general mechanism to make it easy to
-write such commands yourself. For each variable you might to
-temporarily change there is a corresponding @emph{transient} variable that
-overrides it when the transient variable is non-nil. You can write
-your own commands to set these transient variable to the desired value
-without clobbering the value of the variables they override. To reset
-the transient variables to @samp{nil} again after each completion session,
-use the following configuration:
-
-@lisp
-(add-hook 'minibuffer-exit-hook
- #'orderless-remove-transient-configuration)
-@end lisp
-
-The transient variables provided are:
-
-@itemize
-@item
-@samp{orderless-transient-component-separator}
-@item
-@samp{orderless-transient-matching-styles}
-@item
-@samp{orderless-transient-style-dispatchers}
-@end itemize
+configuration on the fly while matching. There many possible user
+interfaces for this: you could toggle between two chosen
+configurations, cycle among several, have a keymap where each key sets
+a different configurations, have a set of named configurations and be
+prompted (with completion) for one of them, popup a
@uref{https://github.com/abo-abo/hydra, hydra} to choose a
+configuration, etc. Since there are so many possible UIs and which to
+use is mostly a matter of taste, @samp{orderless} does not provide any such
+commands. But it's easy to write your own!
For example, say you want to use the keybinding @samp{C-l} to make all
-components match literally. You could use the following configuration:
+components match literally. You could use the following code:
@lisp
(defun my/match-components-literally ()
"Components match literally for the rest of the session."
(interactive)
- (setq orderless-transient-matching-styles '(orderless-literal)
- orderless-transient-style-dispatchers '(ignore)))
-
-(add-hook 'minibuffer-exit-hook
- #'orderless-remove-transient-configuration)
+ (setq-local orderless-matching-styles '(orderless-literal)
+ orderless-style-dispatchers nil))
(define-key minibuffer-local-completion-map (kbd "C-l")
#'my/match-components-literally)
@end lisp
-Note that we also set @samp{orderless-transient-style-dispatchers} to
-@samp{'(ignore)}, to ensure no style dispatchers are used so the literal
-matching does not get overridden. You may want to allow the
-dispatchers in @samp{orderless-style-dispatchers} to override, in which case
-you'd set @samp{orderless-transient-style-dispatchers} to @samp{nil} or simply
-remove that assignment.
+Using @samp{setq-local} to assign to the configuration variables ensures the
+values are only used for that minibuffer completion session.
@node Integration with other completion UIs
@chapter Integration with other completion UIs
@@ -397,14 +367,17 @@ To use @samp{orderless} from Ivy add this to your Ivy
configuration:
@node Selectrum
@section Selectrum
-To use @samp{orderless} from Selectrum add this to your Selectrum
-configuration:
+Recent versions of Selectrum default to using whatever completion
+styles you have configured. You can use @samp{orderless} that way, or you can
use this configuration:
@lisp
(setq selectrum-refine-candidates-function #'orderless-filter)
(setq selectrum-highlight-candidates-function #'orderless-highlight-matches)
@end lisp
+If you use the above configuration, only the visible candidates are
+highlighted, which is a litte more efficient.
+
@node Company
@section Company
- [elpa] externals/orderless 2f2c757a33 117/204: Correct error about orderless-transient-style-dispatchers in README, (continued)
- [elpa] externals/orderless 2f2c757a33 117/204: Correct error about orderless-transient-style-dispatchers in README, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1f985d0e07 119/204: Remove obsolete temporary separator change command and variables, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless c6432b086f 121/204: Bump version number for new smart case feature, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 351d2fbb7d 123/204: Fix typo, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless e316991cfe 127/204: Add negative literals (fix #26), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 6fec4f0a52 129/204: Remove a duplicated documentation entry, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 3bcfb3f806 131/204: Generate texinfo manual from readme, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 487e51ea66 132/204: Merge branch 'master' of https://github.com/oantolin/orderless, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless a22d894d39 142/204: Revert "Update documentation" for #31, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless ea752ba6e3 143/204: Revert "Add matching style and dispatcher per category overrides (fix #31)", ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 8e28b74aab 147/204: Update information about Selectrum,
ELPA Syncer <=
- [elpa] externals/orderless ee5e8bda25 149/204: Remove unnecessary :group in defcustom, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 237ee002ac 158/204: Make orderless-regexp match invalid regexps literally, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 9b70ac8df2 161/204: orderless-filter: Remove unnecessary condition-case, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless f6394f19f3 163/204: orderless-default-pattern-compiler: Ignore nil components, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 3440b5aa33 162/204: orderless-regexp: Return "null matcher" if regexp is invalid, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 818af9e6f0 167/204: Remove pattern compiler variable, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 9637d7fd59 177/204: Merge pull request #56 from minad/readme-fix, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 2646dad28c 182/204: Update manual to mention Vertico, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless f7be0fb8ee 180/204: Make strict initialism independent of syntax tables (fix #60), ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 1e84120a28 184/204: Merge pull request #70 from minad/group, ELPA Syncer, 2022/01/11