GNU bug report logs - #60399
30.0.50; Usage of `isearch-open-invisible-temporary' is not documented

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> posteo.net>

Date: Thu, 29 Dec 2022 10:11:02 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #43 received at 60399 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 60399-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 60399 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary'
 is not documented
Date: Tue, 03 Jan 2023 09:02:14 +0000
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> But it's very natural that the caller of that
> `isearch-open-invisible-temporary` may still want to know the boundaries
> of this overlay after its content is made visible, so as to know when to
> make it invisible again.

I am not sure why isearch should decide this instead of letting
`isearch-open-invisible-temporary' decide what to close.

> The caller could store that information on its own (with a pair of
> markers or another overlay), but it's very natural for the caller to
> just use that overlay.

I'd say easy, not natural. The callee may want to do something with
_all_ the overlays it originally opened, not just the overlays it
originally opened, which _are also intersecting some unspecified
boundary_.

>> I am not even sure how to achieve the desired custom behavior using the
>> current isearch implementation.
>
> `reveal-toggle-invisible` works basically the same way as
> `isearch-open-invisible-temporary` and in
> `outline-reveal-toggle-invisible` I had the same problem as you do,
> which I solved with:
>
>       (let ((o1 (copy-overlay o)))
>         (overlay-put o 'invisible nil)  ;Show (most of) the text.

This is a nice trick, which is unfortunately not very useful in my
situation. Some text should still remain invisible in Org even when
opening is requested. Your code reveals everything unconditionally.

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




This bug report was last modified 2 years and 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.