emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: Is it valid to call isearch-filter-predicate outsid


From: Ihor Radchenko
Subject: RE: [External] : Re: Is it valid to call isearch-filter-predicate outside isearch?
Date: Thu, 01 Jun 2023 08:10:15 +0000

Drew Adams <drew.adams@oracle.com> writes:

>> Sure. I have no issue with this. That's why I asked to add a word of
>> warning about the state of affairs to the docstring. It is not normal
>> that major mode-specific predicates are used elsewhere.
>
> Where do you find that "not normal" guideline? 

That's my intuition. Is some major or minor mode is defining some
customizable predicate function, it is probably going to be called by
that mode with mode-specific settings available to that function.

> In any case, `isearch-filter-predicate' is not a
> "major mode-specific" predicate.  `isearch-mode'
> is a minor mode.

Sure. But I still find calling the predicate outside isearch unexpected.

> And note that the first line of its doc string
> says that it's for "Isearch and replace commands."
>                             ^^^^^^^^^^^

When reading this docstring, I though that "replace" is referring to
`isearch-query-replace'.

> Wrt whether `isearch-done' should restore the
> original/previous value of `isearch-filter-predicate':

I think there is some misunderstanding. I did not intend to mention
restoring the original/previous values.

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