]> code.delx.au - gnu-emacs-elpa/blobdiff - doc/ivy.org
doc/ivy.org: Add a note on :predicate
[gnu-emacs-elpa] / doc / ivy.org
index d74ff5c22a37b1772221311760a7d981c4af1fb6..8c0f35757f7d6d976007a6960d5fcf33efa41123 100644 (file)
@@ -1041,9 +1041,9 @@ equivalents in =ivy-mode= are:
 :PROPERTIES:
 :CUSTOM_ID: api
 :END:
-The main (and only) entry point is =ivy-read= function. It takes two
-required arguments and many optional arguments that can be passed by
-key. The optional =:action= argument is highly recommended for
+The main (and only) entry point is the =ivy-read= function. It takes
+two required arguments and many optional arguments that can be passed
+by a key. The optional =:action= argument is highly recommended for
 features such as multi-actions, non-exiting actions, =ivy-occur= and
 =ivy-resume=.
 
@@ -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.
@@ -1132,8 +1134,8 @@ features such as multi-actions, non-exiting actions, =ivy-occur= and
 :CUSTOM_ID: example---counsel-describe-function
 :END:
 This is a typical example of a function with a non-async collection,
-which is a collection where the strings in the collection are known
-prior to any input from the user.
+which is a collection where all the strings in the collection are
+known prior to any input from the user.
 
 Only the first two arguments (along with =action=) are essential - the
 rest of the arguments are for fine-tuning, and could be omitted.