]> 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 20334a7d8c4a2c0b681a0a9355e19547d85b43ea..8c0f35757f7d6d976007a6960d5fcf33efa41123 100644 (file)
@@ -89,7 +89,7 @@ discoverability.
 - Minimalism ::
      Uncluttered minibuffer is minimalism. Ivy shows the completion
      defaults, the number of matches, and 10 candidate matches below
-     the input line. Customize =ivy-length= to adjust the number of
+     the input line. Customize =ivy-height= to adjust the number of
      candidate matches displayed in the minibuffer.
 
 - Simplicity ::
@@ -219,7 +219,7 @@ Here are some basic settings particularly useful for new Ivy users:
 
 If you want, you can go without any customizations at all. The above
 settings are the most bang for the buck in terms of customization.  So
-users that typically don't like customize a lot are advise to look at
+users that typically don't like customize a lot are advised to look at
 these settings first.
 
 For more advanced customizations, refer to =M-x describe-variable=
@@ -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.