From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented Date: Sun, 01 Jan 2023 15:55:32 +0200 Message-ID: <83tu1a2wbv.fsf@gnu.org> References: <87tu1ev7uu.fsf@localhost> <865yduf73m.fsf@mail.linkov.net> <87mt73afow.fsf@localhost> <83zgb239rv.fsf@gnu.org> <87edse8vu1.fsf@localhost> <83wn6634gb.fsf@gnu.org> <87bkni8lk3.fsf@localhost> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6448"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60399-done@debbugs.gnu.org, juri@linkov.net To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 01 14:56:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pByox-0001UL-Qy for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Jan 2023 14:56:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pByom-0003rq-Bu; Sun, 01 Jan 2023 08:56:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pByol-0003rh-4Y for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 08:56:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pByok-0005Tb-B3 for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 08:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pByoj-0005sy-Mv for bug-gnu-emacs@gnu.org; Sun, 01 Jan 2023 08:56:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Jan 2023 13:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60399 X-GNU-PR-Package: emacs Original-Received: via spool by 60399-done@debbugs.gnu.org id=D60399.167258133822592 (code D ref 60399); Sun, 01 Jan 2023 13:56:01 +0000 Original-Received: (at 60399-done) by debbugs.gnu.org; 1 Jan 2023 13:55:38 +0000 Original-Received: from localhost ([127.0.0.1]:40477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pByoL-0005sJ-DW for submit@debbugs.gnu.org; Sun, 01 Jan 2023 08:55:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pByoJ-0005s5-Lo for 60399-done@debbugs.gnu.org; Sun, 01 Jan 2023 08:55:36 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pByoD-0005Qg-Gj; Sun, 01 Jan 2023 08:55:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=07yT/YlttC6tKzR1Y4wDve7VArImvt73WQin6GCCGq8=; b=P0U1ze0kuDtK Shgq9/kg0n0dcUsyggDJJJO6xUvQg78rcOg9YA2FejDS5vP0pew7mYzHZWsqQi35f8Hbb8EtPtXNR bbGRJpwmc+MgkmxP1fn7gWXsbjmMvvLyIqxLGeljOvSwS3wR1TM6h81EQW1tz7Vb2dnz4oLs1qrJP xGuel12ykW5sjf7TxtpjXhvuTs2/cTbzBPyS/RIRh+FXOp+sLyKqW1M5us1QcOT4Z73gr/bcm51wG IRMgF2ZSux1k52x+aqgJIO/dkj+gk+4VBEMOFlsHJ4j+KvRsmaDbMJ1ma/E8JiT3ZRzOMkOuoB2La /oKxAWy1H6LKs1ouv3h1iw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pByoC-0001Wu-L2; Sun, 01 Jan 2023 08:55:28 -0500 In-Reply-To: <87bkni8lk3.fsf@localhost> (message from Ihor Radchenko on Sun, 01 Jan 2023 12:51:40 +0000) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252246 Archived-At: > From: Ihor Radchenko > Cc: juri@linkov.net, 60399-done@debbugs.gnu.org > Date: Sun, 01 Jan 2023 12:51:40 +0000 > > Eli Zaretskii writes: > > >> What about the manual? > >> (elisp) 41.6 Invisible Text > > > > I don't think this obscure issue needs to be mentioned in the manual. > > It is quite clear to me that the overlay in question cannot be > > deleted, I actually raised a brow when you asked for this to be > > explicitly mentioned. > > I think I need to explain the context a bit. > > In org-fold, we want isearch matched to be not just revealed according > to the full overlays they are hidden in. We want to rearrange the > overlays in such a way that outline structure above the match is > revealed: > > * Folded heading > ** Folded sub-heading > Some unrelated text. > :FOLDED-DRAWER: > isearch-match > :END: > > which will look like > > * Folded heading... > > When we do isearch, the aim is > > * Folded heading > ** Folded sub-heading... > isearch-match > ... > > which requires re-creating overlays used for folding. > > In the process, 'isearch-open-invisible-temporary may affect more than > the overlay used as its argument. In particular, other overlays at point > may be affected. > > 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. Thanks, this background was indeed missing. However, even after reading it, I still don't understand how come you need or want to delete these overlays -- aren't they needed to hide the text to begin with? Or IOW, if you are deleting and recreating the overlays, why do you need to use this isearch feature at all? just delete them when you want to show the text, and reapply them later when you want the text hidden again. > I am not even sure how to achieve the desired custom behavior using the > current isearch implementation. It's an obscure feature indeed.