emacs-devel
[Top][All Lists]
Advanced

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

Re: Is it valid to call isearch-filter-predicate outside isearch?


From: Ihor Radchenko
Subject: Re: Is it valid to call isearch-filter-predicate outside isearch?
Date: Sun, 18 Jun 2023 10:31:50 +0000

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> Do you refer to
>>  (add-function :before (local 'isearch-filter-predicate) #'foo)
>> ?
>
> Yes.
>
>> Two reasons:
>> 1. I only vaguely understand how this works
>
> This can be changed.  Should.

I tried
(add-function :before (local isearch-filter-predicate) 
#'org-fold-core--create-isearch-overlays)
and it somehow had no effect.

Steps I tried:

1. emacs -Q
2. Open a text file 1.txt with some text

A text file 1.txt with some text

3. M-: (defun yant/test (&rest _) (message "Foo"))
4. M-: (add-function :before (local isearch-filter-predicate) #'yant/test)
5. C-s txt <RET>
6. Switch to *Messages* buffer
7. Observe no "Foo" message

What am I missing?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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