From d2a89ea50727ecd3afa99c09a3b654c44d4bd237 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Tue, 19 Apr 2016 16:29:24 +0200 Subject: [PATCH] doc/ivy.org: Add a note on :predicate --- doc/ivy.org | 4 +++- doc/ivy.texi | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/ivy.org b/doc/ivy.org index d8b397abb..8c0f35757 100644 --- a/doc/ivy.org +++ b/doc/ivy.org @@ -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. diff --git a/doc/ivy.texi b/doc/ivy.texi index 24a0c5b09..64afd6b59 100644 --- a/doc/ivy.texi +++ b/doc/ivy.texi @@ -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 -- 2.39.2