emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 1bf4ae2 140/167: Warn the user about the behavior of ivy--


From: Oleh Krehel
Subject: [elpa] master 1bf4ae2 140/167: Warn the user about the behavior of ivy--regex-ignore-order
Date: Tue, 08 Dec 2015 10:50:34 +0000

branch: master
commit 1bf4ae2bc429029ae6be7ce79ebcc6e9ba1a4b58
Author: Samuel Loury <address@hidden>
Commit: Oleh Krehel <address@hidden>

    Warn the user about the behavior of ivy--regex-ignore-order
    
    Fixes #296
    Fixes #305
---
 ivy.el |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index 19fc0e9..050f460 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1382,7 +1382,16 @@ When GREEDY is non-nil, join words in a greedy way."
 
 (defun ivy--regex-ignore-order (str)
   "Re-build regex from STR by splitting it on spaces.
-Ignore the order of each group."
+Ignore the order of each group.
+
+ATTENTION: This is a proof of concept and may not work as you
+expect. It will match as many groups as there are in the STR, but
+won't make sure that the matches are distinct. For instance, if
+you type 'foo bar', anything that contains 'foo' and 'bar', 'bar'
+and 'foo' will be matched, but also anything that contains 'foo'
+twice or 'bar' twice. If you want to find all candidates containing 'foo' and
+'bar' in any order, consider using `ivy-restrict-to-matches' instead.
+"
   (let* ((subs (split-string str " +" t))
          (len (length subs)))
     (cl-case len



reply via email to

[Prev in Thread] Current Thread [Next in Thread]