From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented Date: Mon, 02 Jan 2023 10:34:27 -0500 Message-ID: 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> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14593"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 60399-done@debbugs.gnu.org, Eli Zaretskii , 60399@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 Mon Jan 02 16:42: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 1pCMx4-0003Zg-Vs for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Jan 2023 16:42:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pCMwu-0008Gl-7D; Mon, 02 Jan 2023 10:42: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 1pCMws-0008GR-Ff for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 10:42:02 -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 1pCMwr-0002Gh-UH for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 10:42:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pCMwr-00076L-PI for bug-gnu-emacs@gnu.org; Mon, 02 Jan 2023 10:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Jan 2023 15:42: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-submit@debbugs.gnu.org id=B60399.167267410227267 (code B ref 60399); Mon, 02 Jan 2023 15:42:01 +0000 Original-Received: (at 60399) by debbugs.gnu.org; 2 Jan 2023 15:41:42 +0000 Original-Received: from localhost ([127.0.0.1]:43849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCMwX-00075f-VQ for submit@debbugs.gnu.org; Mon, 02 Jan 2023 10:41:42 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:48826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCMwV-00075M-L5; Mon, 02 Jan 2023 10:41:40 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A0776814F5; Mon, 2 Jan 2023 10:34:30 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0CED7813F9; Mon, 2 Jan 2023 10:34:29 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1672673669; bh=CM5CJgjG4i/JMt1XashYS4TTCVXDw40j3M11OZJ0lk8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KM1yqmd3Ow4oDK1UJOH2yVgXWTmeC9ZdVPspMBPcY5k1QJO45jxdWIJdTm9zhRmZq 1U8poaL8kBotldxM7mLwe8OkBc8QJjgFd8BpNdQtzb+xxZm4xr27sL7BxBO0WJeJl8 ZvrLpIVp/dLi29fBsEzt2WtR59Vub8kQZnX4U0pyvS7r1tfX8zUYi9ClZUaXkmbkGv GmMh3TsksCulyZ5uwvJNT2i/gdTjB3wcYuj/2IUDq9TmJIdaKW0TXQbjGX9TjhsVOs pS1LGWMP2TMTEpcjHUt0XjylCiXIv7UIu4PyP3AKdvcvzGpuwAISDhivoH8z1q5W8D KIJXZNR5HD9BQ== Original-Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C0CC61201BE; Mon, 2 Jan 2023 10:34:28 -0500 (EST) In-Reply-To: <87bkni8lk3.fsf@localhost> (Ihor Radchenko's message of "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:252342 Archived-At: > 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