[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orderless b059c15911 052/204: Make orderless-prefixes m
From: |
ELPA Syncer |
Subject: |
[elpa] externals/orderless b059c15911 052/204: Make orderless-prefixes more like partial-completion |
Date: |
Tue, 11 Jan 2022 12:58:17 -0500 (EST) |
branch: externals/orderless
commit b059c15911894035eba8cf097699dbf86d6c5c97
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Make orderless-prefixes more like partial-completion
---
README.org | 11 ++++++-----
orderless.el | 12 ++++++------
2 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/README.org b/README.org
index 8d4c6c1563..b6cc4ef117 100644
--- a/README.org
+++ b/README.org
@@ -4,7 +4,7 @@ This package provides an =orderless= 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 hyphenated word prefixes. By default, regexp and
+the flex style, or as multiple word prefixes. By default, regexp and
initialism matches are enabled.
Completion styles like =orderless= are used as entries in the variables
@@ -60,12 +60,13 @@ define new matching styles. The predefined ones are:
This maps =abc= to =a.*b.*c=.
-- orderless-prefixes :: the component is split on hyphens and slashes
- and each piece must be a word prefix in the candidate, occurring in
- that order.
+- 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 =partial-completion= completion-style.
- For example =re-re= matches =query-replace-regexp= and =recode-region=.
+ For example, =re-re= matches =query-replace-regexp=, =recode-region= and
+ =magit-remote-list-refs=; =f-d.t= matches =final-draft.txt=.
The variable =orderless-component-matching-style= should be set to a
list of the desired styles to use. By default it enables the regexp
diff --git a/orderless.el b/orderless.el
index 9a20817577..4965b140a7 100644
--- a/orderless.el
+++ b/orderless.el
@@ -156,13 +156,13 @@ candidate, in that order, at the beginning of words."
(cl-loop for char across component collect `(seq word-start ,char))))
(defun orderless-prefixes (component)
- "Match a component as slash-or-hyphen-separated word prefixes.
-The COMPONENT is split on slashes and hyphens, and each piece
-must match a prefix of a word in the candidate. This is similar
-to the `partial-completion' completion style."
+ "Match a component as multiple word prefixes.
+The COMPONENT is split at word endings, and each piece must match
+at a word boundary in the candidate. This is similar to the
+`partial-completion' completion style."
(orderless--anything-between
- (cl-loop for prefix in (split-string component "[/-]")
- collect `(seq word-start ,prefix))))
+ (cl-loop for prefix in (split-string component "\\>" t)
+ collect `(seq word-boundary ,prefix))))
(defun orderless--highlight-matches (regexps string)
"Highlight a match of each of the REGEXPS in STRING.
- [elpa] externals/orderless 1631eb1733 073/204: Fix autoload for ivy, (continued)
- [elpa] externals/orderless 1631eb1733 073/204: Fix autoload for ivy, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 862eed345c 075/204: Add more orderless initialism styles, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless e3644defcd 088/204: Add orderless-pattern-compiler variable for maximum flexibility, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 436ef98b16 089/204: Add optional argument for dispatches: total number of components, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless ed37c22902 097/204: Prefer descriptive argument over "mystery t's", ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 9cebf2fc8c 106/204: Escape parenthesis in first column of docstrings, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 93f4bccea1 112/204: Go back to split-string until empty components issue is resolved, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 2d1f68b914 114/204: Fix tiny bug in customization type, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 5c2f44d901 115/204: Allow component separator to be a function, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 43896f3e10 140/204: Accidentally omitted the overview! Bring it back, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless b059c15911 052/204: Make orderless-prefixes more like partial-completion,
ELPA Syncer <=
- [elpa] externals/orderless dc3f8da022 076/204: Avoid other cl-pushnes in an autoload, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless a11302737e 018/204: Keep split-string from modifying global match data, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless c9ae65ea16 023/204: Highlight component matches in one of four faces, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 044fac0859 029/204: Revert "Better match face defaults (kindly contributed by Protesilaos)", ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 2813ffb2b1 039/204: Optimization: check if first component is string literal, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 25266dfc60 033/204: Update README.org, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 39202177e1 040/204: Undo previous optimization as it is invalid in general :(, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless ecddc3da2e 045/204: Un-nest definition of orderless--highlight-matches, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless 582b3a9fa8 031/204: Make all `defface' syntax more efficient+readable, ELPA Syncer, 2022/01/11
- [elpa] externals/orderless c51037b8ef 024/204: Add custom variable for component separator regexp, ELPA Syncer, 2022/01/11