all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: 60399-done@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>,
	60399@debbugs.gnu.org, juri@linkov.net
Subject: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented
Date: Mon, 02 Jan 2023 10:34:27 -0500	[thread overview]
Message-ID: <jwvh6x9klyn.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87bkni8lk3.fsf@localhost> (Ihor Radchenko's message of "Sun, 01 Jan 2023 12:51:40 +0000")

> 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






  parent reply	other threads:[~2023-01-02 15:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-29 10:10 bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented Ihor Radchenko
2022-12-29 17:33 ` Juri Linkov
2022-12-31 13:03   ` Ihor Radchenko
2023-01-01  9:05     ` Eli Zaretskii
2023-01-01  9:09       ` Ihor Radchenko
2023-01-01 11:00         ` Eli Zaretskii
2023-01-01 12:51           ` Ihor Radchenko
2023-01-01 13:55             ` Eli Zaretskii
2023-01-02  8:57               ` Ihor Radchenko
2023-01-02 12:29                 ` Eli Zaretskii
2023-01-02 15:34             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-01-03  9:02               ` Ihor Radchenko
2023-01-03 14:14                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvh6x9klyn.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=60399-done@debbugs.gnu.org \
    --cc=60399@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    --cc=monnier@iro.umontreal.ca \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.