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: Sat, 03 Jun 2023 08:35:30 +0000

Michael Heerdegen <michael_heerdegen@web.de> writes:

>> 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.

Interesting.
>From Elisp Tips in the manual, I always felt that using advices is
always frowned upon. And you are suggesting that they are the better way
to go in these situations.
I am wondering if this thing with modifying predicates should be
documented somewhere and recommended approach.

> 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.

May you please elaborate? I am not sure what `kill-variable' calls you
are referring to here.

-- 
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]