[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult 7940c07 3/3: Remove the space splitting style (
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult 7940c07 3/3: Remove the space splitting style (See #393) |
Date: |
Mon, 9 Aug 2021 16:57:08 -0400 (EDT) |
branch: externals/consult
commit 7940c0732bee6846ecffbad2b1a245348d25125a
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Remove the space splitting style (See #393)
---
CHANGELOG.org | 13 ++++++-------
consult.el | 15 +++++++++------
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/CHANGELOG.org b/CHANGELOG.org
index 84e1149..578c88e 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -16,18 +16,17 @@
Due to the changes to =consult-find= it is not possible anymore to configure
=fd= as backend for =consult-find=. A replacement is documented in the wiki.
- =consult-find/locate/man=: Add highlighting to the matching file/man page
names.
-- =consult-grep/git-grep/ripgrep/find/locate=: Add support for multiple
patterns.
- + =consult-git-grep= and =consult-find= support unordered patterns out of
the box.
- Example: "first second third" is transformed to "first -and second -and
third".
- + =consult-grep= and =consult-ripgrep= support unordered patterns if the
program
- supports it.
- + =consult-locate= only support ordered patterns.
- Example: "first second third" is transformed to "first.*second.*third".
+- =consult-grep/git-grep/ripgrep/find/locate=: Add support for multiple
unordered
+ patterns. Each of the input patterns must be matched. For example,
+ =consult-find= transforms the input "first second third" to "first -and
second
+ -and third".
- =consult-grep/git-grep/ripgrep=: Compute the highlighting based on the input,
instead of relying on the ANSI-escaped output. This works better with
multiple
patterns, but may occasionally produce false highlighting.
- Deprecate =consult-x-command= configuration variables in favor of
=consult-x-args=.
The variables have been renamed since the configuration format changed.
+- =consult-async-split-styles-alist=: Remove the =space= splitting style, since
+ it has been obsoleted by the support for multiple unordered patterns.
* Version 0.9 (2021-06-22)
diff --git a/consult.el b/consult.el
index a57c943..0f111e5 100644
--- a/consult.el
+++ b/consult.el
@@ -115,20 +115,18 @@ This applies to asynchronous commands, e.g.,
`consult-grep'."
:type 'integer)
(defcustom consult-async-split-style 'perl
- "Async splitter style, see `consult-async-split-styles-alist'."
+ "Async splitting style, see `consult-async-split-styles-alist'."
:type '(choice (const :tag "No splitting" nil)
- (const :tag "Space" space)
(const :tag "Comma" comma)
(const :tag "Semicolon" semicolon)
(const :tag "Perl" perl)))
(defcustom consult-async-split-styles-alist
'((nil :type nil)
- (space :separator ?\s :type separator)
(comma :separator ?, :type separator)
(semicolon :separator ?\; :type separator)
(perl :initial "#" :type perl))
- "Async splitter styles."
+ "Async splitting styles."
:type '(alist :key-type symbol :value-type plist))
(defcustom consult-mode-histories
@@ -1488,9 +1486,14 @@ string Update with the current user input string.
Return nil."
candidates)))))
(defun consult--async-split-style ()
- "Return the async split style function and initial string."
+ "Return the async splitting style function and initial string."
(or (alist-get consult-async-split-style consult-async-split-styles-alist)
- (user-error "Split style `%s' not found" consult-async-split-style)))
+ ;; TODO Remove the special warning about the obsoletion
+ (when (eq consult-async-split-style 'space)
+ (user-error "The splitting style `space' has been obsoleted.
+`%s' automatically splits the input into separate regexps.
+The splitting styles `nil', `perl' or `semicolon' are recommended instead"
this-command))
+ (user-error "Splitting style `%s' not found" consult-async-split-style)))
(defun consult--async-split-initial (initial)
"Return initial string for async command.