[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it valid to call isearch-filter-predicate outside isearch?
From: |
Michael Heerdegen |
Subject: |
Re: Is it valid to call isearch-filter-predicate outside isearch? |
Date: |
Sat, 03 Jun 2023 01:06:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
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.
> 2. It feels against the interface. If advising this predicate is
> expected, why not convert it into an abnormal hook?
It's more flexible and expressive, as Drew already mentioned. For
example, how the members of a hook are logically combined (`and'ed,
`or'ed) is fixed in a hook, but not when using advising.
I also wonder about the `kill-variable' calls: what if the user or a
third-party mode want to have own buffer-local settings for these? We then
erase
them when killing the local variables. With using an advice on these
the worst thing that could happen is that we leave a buffer local
variable with the same binding as the global one, where we started with
no buffer local binding.
Michael.
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Eli Zaretskii, 2023/06/01
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Juri Linkov, 2023/06/01
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/01
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Juri Linkov, 2023/06/01
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/06/01
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/02
- RE: [External] : Re: Is it valid to call isearch-filter-predicate outside isearch?, Drew Adams, 2023/06/02
- Re: Is it valid to call isearch-filter-predicate outside isearch?,
Michael Heerdegen <=
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/03
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/06/03
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/17
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/06/17
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/18
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/06/03
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/18
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Michael Heerdegen, 2023/06/18
- Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/19
Re: Is it valid to call isearch-filter-predicate outside isearch?, Ihor Radchenko, 2023/06/01