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 #37 received at 60399 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ihor Radchenko <yantar92 <at> posteo.net>
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: Mon, 02 Jan 2023 10:34:27 -0500
> The 'isearch-open-invisible-temporary takes care about proper saving and
> restoring the necessary overlays. However, isearch gets broken.
>
> In this setup, it is not that obvious that isearch will still try to do
> something with overlays that got deleted during the call to
> 'isearch-open-invisible-temporary.

FWIW, I never fully understood Richard's design (installed in commit
0352b205714e1c7ab97c1b6dc7678f6b51ebe089), indeed.  E.g. I don't
understand why there need to be both
a `isearch-open-invisible-temporary` and a `isearch-open-invisible` property.

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.

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


-- Stefan





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.