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: Juri Linkov
Subject: Re: Is it valid to call isearch-filter-predicate outside isearch?
Date: Thu, 01 Jun 2023 19:21:12 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>>       (if (org-fold-core-get-folding-spec-property spec :isearch-open)
>>        (overlay-put o 'isearch-open-invisible #'delete-overlay)
>>         (overlay-put o 'isearch-open-invisible #'ignore)
>>         (overlay-put o 'isearch-open-invisible-temporary #'ignore))
>>                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> Can't you bind this to a function that does what you want?  AFAIU it is
>> called with two arguments - the overlay itself and a bool saying "open"
>> (nil) or "re-hide" (non-nil).  That should allow to not rely on any
>> hooks to remove your helper overlays.  Unless, maybe, not all of them
>> are opened.  Can that happen?
>
> I tried... But it is prohibited to remove overlays when isearch is
> tracking them: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=60399

If it helps, you could design a new property that will obsolete the
deficient 'isearch-open-invisible-temporary'.  For a few releases
the old property should be supported, but then eventually it will
simplify code in Org-mode.



reply via email to

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