]> code.delx.au - gnu-emacs-elpa/commitdiff
doc/ivy.org: Add a note on :predicate
authorOleh Krehel <ohwoeowho@gmail.com>
Tue, 19 Apr 2016 14:29:24 +0000 (16:29 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Tue, 19 Apr 2016 14:32:11 +0000 (16:32 +0200)
doc/ivy.org
doc/ivy.texi

index d8b397abb52c15f1cf7f1b23238293fc5508d67b..8c0f35757f7d6d976007a6960d5fcf33efa41123 100644 (file)
@@ -1070,7 +1070,9 @@ features such as multi-actions, non-exiting actions, =ivy-occur= and
 :END:
 - =predicate= ::
      Is a function to filter the initial collection. It has to be
-     compatible with =all-completions=.
+     compatible with =all-completions=. Tip: most of the time, it's
+     simpler to just apply this filter to the =collection= argument
+     itself, e.g. =(cl-remove-if-not predicate collection)=.
 - =require-match= ::
      When set to a non-nil value, input must match one of the
      candidates. Custom input is not accepted.
index 24a0c5b096f08182d18f0aa3c9d58c1fba5f76a8..64afd6b593d5fde3a888b113f3bdc73a5132d529 100644 (file)
@@ -1408,7 +1408,9 @@ If a function, then it has to be compatible with
 @subsubheading @code{predicate}
 @indentedblock
 Is a function to filter the initial collection. It has to be
-compatible with @code{all-completions}.
+compatible with @code{all-completions}. Tip: most of the time, it's
+simpler to just apply this filter to the @code{collection} argument
+itself, e.g. @code{(cl-remove-if-not predicate collection)}.
 @end indentedblock
 @subsubheading @code{require-match}
 @indentedblock