From unknown Sun Jun 15 08:36:30 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#60399 <60399@debbugs.gnu.org> To: bug#60399 <60399@debbugs.gnu.org> Subject: Status: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented Reply-To: bug#60399 <60399@debbugs.gnu.org> Date: Sun, 15 Jun 2025 15:36:30 +0000 retitle 60399 30.0.50; Usage of `isearch-open-invisible-temporary' is not d= ocumented reassign 60399 emacs submitter 60399 Ihor Radchenko severity 60399 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 29 05:10:19 2022 Received: (at submit) by debbugs.gnu.org; 29 Dec 2022 10:10:19 +0000 Received: from localhost ([127.0.0.1]:59332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAprf-0004Kv-H5 for submit@debbugs.gnu.org; Thu, 29 Dec 2022 05:10:19 -0500 Received: from lists.gnu.org ([209.51.188.17]:59752) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pApre-0004Ko-KQ for submit@debbugs.gnu.org; Thu, 29 Dec 2022 05:10:18 -0500 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 1pApre-0004PF-9G for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 05:10:18 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pAprc-00043v-7N for bug-gnu-emacs@gnu.org; Thu, 29 Dec 2022 05:10:18 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 370482401D0 for ; Thu, 29 Dec 2022 11:10:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672308613; bh=3hsKRvy4xRwul+5SQRyfvuyPH3xbSIve3tUfNfq1gfI=; h=From:To:Subject:Date:From; b=aNZVQcg+hfWpYjlOvsxjckGhhQJqmjTsAg1m8UkX6SwAqivZ1+kafIkXJmLwu7Qiw /3pbyHTL3L9TJENmWR5/swVTGuEeswjjA/kxVI22oNLV6BFUhBYkFIdD+FSiL8zER8 Pv8NDTsmQWAQWWByyAI1mcdRJZPI/Lo1KHwgYIV1mM9gMNubZ0Jb1DoOcxYVa8VQfD vo+HtYRVoVkIM51HZmlqe7IJMZY0QZxj0FT6a87Wldi8fb2p42zmPXRt6Ovq+LdVp2 8xdyJBf0zxkyvlbnbSyKWVZw4kKi5PtGxrw2w/oZwlTLUz+6YKH5ZECq+nvrrXD6sP /8kZZO2sCuisw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NjPK03Vdnz6tmQ for ; Thu, 29 Dec 2022 11:10:09 +0100 (CET) From: Ihor Radchenko To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented Date: Thu, 29 Dec 2022 10:10:01 +0000 Message-ID: <87tu1ev7uu.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi, According to isearch.el source, one can use `isearch-open-invisible-temporary' to implement custom hidden text display during isearch. However, it is unclear what are the requirements for that function. >From isearch source code, it appears that the function should accept two arguments: overlays and a flag to open/close the overlay: ;; Some modes would want to open the overlays temporary during ;; isearch in their own way, they should set the ;; `isearch-open-invisible-temporary' to a function doing this. (funcall (overlay-get ov 'isearch-open-invisible-temporary) ov nil) However, it appears that deleting the passed overlay is, in fact, prohibited. (manifested in https://orgmode.org/list/87pmc4smdg.fsf@fastmail.fm) Is there some detailed information about this feature available somewhere? Best, Ihor In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6) of 2022-12-26 built on localhost Repository revision: cc29fab3a66c59e77d0ff67c0f3e2e34ec80a03c Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Gentoo Linux -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 29 12:35:06 2022 Received: (at 60399) by debbugs.gnu.org; 29 Dec 2022 17:35:06 +0000 Received: from localhost ([127.0.0.1]:60977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAwo5-00043D-Vq for submit@debbugs.gnu.org; Thu, 29 Dec 2022 12:35:06 -0500 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:44225) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pAwnu-00042t-Nf for 60399@debbugs.gnu.org; Thu, 29 Dec 2022 12:35:00 -0500 Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id 65E1A20007; Thu, 29 Dec 2022 17:34:46 +0000 (UTC) From: Juri Linkov To: Ihor Radchenko Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented In-Reply-To: <87tu1ev7uu.fsf@localhost> (Ihor Radchenko's message of "Thu, 29 Dec 2022 10:10:01 +0000") Organization: LINKOV.NET References: <87tu1ev7uu.fsf@localhost> Date: Thu, 29 Dec 2022 19:33:01 +0200 Message-ID: <865yduf73m.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 60399 Cc: 60399@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > According to isearch.el source, one can use > `isearch-open-invisible-temporary' to implement custom hidden text > display during isearch. However, it is unclear what are the requirements > for that function. > > From isearch source code, it appears that the function should accept two > arguments: overlays and a flag to open/close the overlay: > > ;; Some modes would want to open the overlays temporary during > ;; isearch in their own way, they should set the > ;; `isearch-open-invisible-temporary' to a function doing this. > (funcall (overlay-get ov 'isearch-open-invisible-temporary) ov nil) > > However, it appears that deleting the passed overlay is, in fact, > prohibited. (manifested in > https://orgmode.org/list/87pmc4smdg.fsf@fastmail.fm) > > Is there some detailed information about this feature available somewhere? I don't know about this function more than you can read from source code, but can find two mentions in (info "(elisp) Invisible Text") and (info "(elisp) Overlay Properties"). From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 31 08:02:54 2022 Received: (at 60399) by debbugs.gnu.org; 31 Dec 2022 13:02:54 +0000 Received: from localhost ([127.0.0.1]:36766 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBbVm-0006oZ-2H for submit@debbugs.gnu.org; Sat, 31 Dec 2022 08:02:54 -0500 Received: from mout02.posteo.de ([185.67.36.66]:42973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBbVj-0006oJ-Ik for 60399@debbugs.gnu.org; Sat, 31 Dec 2022 08:02:52 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B91B1240199 for <60399@debbugs.gnu.org>; Sat, 31 Dec 2022 14:02:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672491765; bh=QVJBhQwc/RFogZDmKFWvvSrq4apPoWlOakEC2+YtTWY=; h=From:To:Cc:Subject:Date:From; b=Pw1etM1cD3CCYk+Q5kiog08Aaldeibp5y4Z7PXUXC6iyB7vEzQRjzFBnQYC/0n1QV +gi3MTfoApVSqiPn9DAdXAZaM6B5OuO/EzKGjw7NhsDzMuNJNLPE9ZcAq9Tc/JmI6U 5j+QJapZfyq2E/fK9X10EY8pjhGtc4ue66xCG1fyVIKTJXGbfSbfwgsFB+67zoRQsJ HLABl3SnASetHG2nnAhpQWr8yJoFhA5OGqvF2muy0+mTFJYoOVda/I59N15VQcpI8x g8/+OneZNorfWqWK354OMxU8GzHRK5OoKj6OaYL+wZjHDmSJb10x4FLI8ATcnEIOKu jVLxuUtqdBmMA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Nkj386XkWz6tnY; Sat, 31 Dec 2022 14:02:44 +0100 (CET) From: Ihor Radchenko To: Juri Linkov Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented In-Reply-To: <865yduf73m.fsf@mail.linkov.net> References: <87tu1ev7uu.fsf@localhost> <865yduf73m.fsf@mail.linkov.net> Date: Sat, 31 Dec 2022 13:03:11 +0000 Message-ID: <87mt73afow.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399 Cc: 60399@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Juri Linkov writes: >> ;; Some modes would want to open the overlays temporary during >> ;; isearch in their own way, they should set the >> ;; `isearch-open-invisible-temporary' to a function doing this. >> (funcall (overlay-get ov 'isearch-open-invisible-temporary) ov nil) >> >> However, it appears that deleting the passed overlay is, in fact, >> prohibited. (manifested in >> https://orgmode.org/list/87pmc4smdg.fsf@fastmail.fm) >> >> Is there some detailed information about this feature available somewhere? > > I don't know about this function more than you can read from source code, > but can find two mentions in (info "(elisp) Invisible Text") and > (info "(elisp) Overlay Properties"). Manual provides no more information. Would it make sense to mention that overlays passed as an argument of 'isearch-open-invisible-temporary function must not be destroyed? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 04:05:17 2023 Received: (at 60399-done) by debbugs.gnu.org; 1 Jan 2023 09:05:17 +0000 Received: from localhost ([127.0.0.1]:40269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBuHN-0001z6-GS for submit@debbugs.gnu.org; Sun, 01 Jan 2023 04:05:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBuHL-0001yo-6Z for 60399-done@debbugs.gnu.org; Sun, 01 Jan 2023 04:05:16 -0500 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 1pBuHE-0007gR-T5; Sun, 01 Jan 2023 04:05:08 -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=iSOFeaD6SyrQRP5QIEdOAkFPE2QR6SYnBMjt0vBE/F8=; b=McEIC3O7mtzm 7aJD9zrlPP3S4AZOAgSfnCbxe+cCozt+TsytZlJE/h137ph9anP2Sr1rD32iNhAXVQl8gtmuSV/Uj zfIuua3yysqMxu8Epr0lppfdCkD5mO+R0nX7RgX2rBmDbmg84izyxoa0pouZtMmCdBdSit3B7gIYF bF8QV3dArd1ycJKQ1pOfuw9xcMbdOGY3Nn7WP9P7s3uOuvUbzE9lnZSeEe7Yw5538N+oI9AITKeE9 9kyQcRn1MUuJp1AyOVatc0WiCTD2V7b/I89EDLq6cCEzNbh7j79bBYMJtl8LcKwzPHmnfVktGMnjK soTOrk/A5v9ppyerBIsYGg==; 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 1pBuHC-0000L0-2S; Sun, 01 Jan 2023 04:05:06 -0500 Date: Sun, 01 Jan 2023 11:05:08 +0200 Message-Id: <83zgb239rv.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87mt73afow.fsf@localhost> (message from Ihor Radchenko on Sat, 31 Dec 2022 13:03:11 +0000) Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented References: <87tu1ev7uu.fsf@localhost> <865yduf73m.fsf@mail.linkov.net> <87mt73afow.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399-done Cc: 60399-done@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 60399@debbugs.gnu.org > From: Ihor Radchenko > Date: Sat, 31 Dec 2022 13:03:11 +0000 > > Juri Linkov writes: > > >> ;; Some modes would want to open the overlays temporary during > >> ;; isearch in their own way, they should set the > >> ;; `isearch-open-invisible-temporary' to a function doing this. > >> (funcall (overlay-get ov 'isearch-open-invisible-temporary) ov nil) > >> > >> However, it appears that deleting the passed overlay is, in fact, > >> prohibited. (manifested in > >> https://orgmode.org/list/87pmc4smdg.fsf@fastmail.fm) > >> > >> Is there some detailed information about this feature available somewhere? > > > > I don't know about this function more than you can read from source code, > > but can find two mentions in (info "(elisp) Invisible Text") and > > (info "(elisp) Overlay Properties"). > > Manual provides no more information. > > Would it make sense to mention that overlays passed as an argument of > 'isearch-open-invisible-temporary function must not be destroyed? I've now added a warning to this effect to the comments in isearch-open-overlay-temporary, and I'm therefore closing this bug. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 04:09:24 2023 Received: (at 60399-done) by debbugs.gnu.org; 1 Jan 2023 09:09:25 +0000 Received: from localhost ([127.0.0.1]:40280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBuLM-00025T-LY for submit@debbugs.gnu.org; Sun, 01 Jan 2023 04:09:24 -0500 Received: from mout02.posteo.de ([185.67.36.66]:54187) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBuLL-00025H-2k for 60399-done@debbugs.gnu.org; Sun, 01 Jan 2023 04:09:23 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 58A19240172 for <60399-done@debbugs.gnu.org>; Sun, 1 Jan 2023 10:09:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672564157; bh=BvKpgQ/DF8rM1fTSeaIXG8gJF2TQq1uihpCxkf3SRxI=; h=From:To:Cc:Subject:Date:From; b=GuEzY107dmr9qcgaD1udr7/E9djqae5i+NrnEc64WSh89StXPTu69bi+eYdePTpUZ RTpep+YW4z0V0ZiMgSV5Xx6H8Bk0aFYFoQLL5/gTUZk6ZIZSV8Tn17uind1ZwYzx3A 5QMbHM6cWMg3lToE+8vkNC2qZlvX13j/IPmQ6VTlYdb/SlL4d5rVtcrP9j5c/0w0QG pXj1jJS1XIQo06YUP8w8HpHstPN6/I0Foy96fm5CQCdp6jUqPs2JHx9JTBmZO23MJO r3smAZNxSlU9MFIEeHBCrONx7rkxiTpIwX6BVUvpGVwf9ndDR0n8A8SJEOZJnLlKK9 iVE/laXc4htKA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NlCqJ3DSyz6tmq; Sun, 1 Jan 2023 10:09:16 +0100 (CET) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented In-Reply-To: <83zgb239rv.fsf@gnu.org> References: <87tu1ev7uu.fsf@localhost> <865yduf73m.fsf@mail.linkov.net> <87mt73afow.fsf@localhost> <83zgb239rv.fsf@gnu.org> Date: Sun, 01 Jan 2023 09:09:42 +0000 Message-ID: <87edse8vu1.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399-done Cc: 60399-done@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> Manual provides no more information. >> >> Would it make sense to mention that overlays passed as an argument of >> 'isearch-open-invisible-temporary function must not be destroyed? > > I've now added a warning to this effect to the comments in > isearch-open-overlay-temporary, and I'm therefore closing this bug. What about the manual? (elisp) 41.6 Invisible Text -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 06:00:11 2023 Received: (at 60399-done) by debbugs.gnu.org; 1 Jan 2023 11:00:11 +0000 Received: from localhost ([127.0.0.1]:40341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBw4Y-0005OQ-TO for submit@debbugs.gnu.org; Sun, 01 Jan 2023 06:00:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60798) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBw4V-0004uD-Ot for 60399-done@debbugs.gnu.org; Sun, 01 Jan 2023 06:00:10 -0500 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 1pBw4P-00012d-Lk; Sun, 01 Jan 2023 06:00:01 -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=QNJlkLkALXrDdWCTgR8vLX9ByLcsAiEbSvyYzruIvB0=; b=Z1SH5wMqF7hW Qhy3LK/FFcMysBwG+CY3LWFZv7rHOk+DeoqfDxBVXp/0zbuHKl/tVwEE3Rttav04EiHbgaZ65fmS6 Vo8dQcKdc+vrv+B14CsGFBv6pQ24oA/Vg83CZYPqsktnxcy8E9tspyvYdO/6IVrmbVtJMMEXrV6yg ggcMiIgN0jEsnCVL7/dFotp8c6UsI7Npb2K9XhX17pdbpVsCKn4dSeiVvmrSnAeBRwwU8TBwYXhRW q0ok4UlIiZ5voZsgMLR2ELOhpwyYcUmDwXWT08+wdRfPpmP51iV5kmEsvvcYMmhPs29ZYl15+K5G0 8kYOflXzZ5yuGL8Ok+k4Rg==; 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 1pBw4O-0004DT-S4; Sun, 01 Jan 2023 06:00:01 -0500 Date: Sun, 01 Jan 2023 13:00:04 +0200 Message-Id: <83wn6634gb.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87edse8vu1.fsf@localhost> (message from Ihor Radchenko on Sun, 01 Jan 2023 09:09:42 +0000) Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented References: <87tu1ev7uu.fsf@localhost> <865yduf73m.fsf@mail.linkov.net> <87mt73afow.fsf@localhost> <83zgb239rv.fsf@gnu.org> <87edse8vu1.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399-done Cc: 60399-done@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: juri@linkov.net, 60399-done@debbugs.gnu.org > Date: Sun, 01 Jan 2023 09:09:42 +0000 > > Eli Zaretskii writes: > > >> Manual provides no more information. > >> > >> Would it make sense to mention that overlays passed as an argument of > >> 'isearch-open-invisible-temporary function must not be destroyed? > > > > I've now added a warning to this effect to the comments in > > isearch-open-overlay-temporary, and I'm therefore closing this bug. > > 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 07:51:25 2023 Received: (at 60399-done) by debbugs.gnu.org; 1 Jan 2023 12:51:25 +0000 Received: from localhost ([127.0.0.1]:40430 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBxoD-0004Hg-Bj for submit@debbugs.gnu.org; Sun, 01 Jan 2023 07:51:25 -0500 Received: from mout02.posteo.de ([185.67.36.66]:36871) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBxoB-0004HT-Gv for 60399-done@debbugs.gnu.org; Sun, 01 Jan 2023 07:51:24 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id A10BD2401B5 for <60399-done@debbugs.gnu.org>; Sun, 1 Jan 2023 13:51:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672577477; bh=1m0k1lEmgz5wOSsm3DIznklrRuB/wKUE2EHUxJKukec=; h=From:To:Cc:Subject:Date:From; b=IaCN/wzvTmByTejip6l325rD4owwjWzZcZDK86sD0ns1gqCueGmjHExeKUz0gYjTP xT56uc2Q6UqoIjV9/zZ8SQZgAIZTaP4+T6tZIsRXYDB/FTPdsWLD0DQB3CKna2FYlz 16iip8hLZZnd/LsH8G8LI98lxyMJw5oWX/hs2Pr/ouxdnUSt498HQ6Yu2tdmDV0Gem 3LqOBwNxcBWDBp+Z2z7elcHSrb5wq5N/WfAFemydoQvSJGzlmZretuW1HyzmWT1147 /6F1stfySp6WUoj0NuC4MyN4Ehrz8Ll0Uoi9VwQsnSnIu1DGRYiQqteZZUmG4EAlMB jLq9Y+6bjyJHQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NlJlS4LRpz9rxK; Sun, 1 Jan 2023 13:51:14 +0100 (CET) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented In-Reply-To: <83wn6634gb.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> Date: Sun, 01 Jan 2023 12:51:40 +0000 Message-ID: <87bkni8lk3.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399-done Cc: 60399-done@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. I am not even sure how to achieve the desired custom behavior using the current isearch implementation. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 01 08:55:37 2023 Received: (at 60399-done) by debbugs.gnu.org; 1 Jan 2023 13:55:38 +0000 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 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 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==; 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 Date: Sun, 01 Jan 2023 15:55:32 +0200 Message-Id: <83tu1a2wbv.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko In-Reply-To: <87bkni8lk3.fsf@localhost> (message from Ihor Radchenko on Sun, 01 Jan 2023 12:51:40 +0000) Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented 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> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399-done Cc: 60399-done@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 02 03:56:50 2023 Received: (at 60399-done) by debbugs.gnu.org; 2 Jan 2023 08:56:50 +0000 Received: from localhost ([127.0.0.1]:42428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCGcj-0005YV-Tn for submit@debbugs.gnu.org; Mon, 02 Jan 2023 03:56:50 -0500 Received: from mout01.posteo.de ([185.67.36.65]:60647) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCGch-0005YH-Or for 60399-done@debbugs.gnu.org; Mon, 02 Jan 2023 03:56:48 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E4441240268 for <60399-done@debbugs.gnu.org>; Mon, 2 Jan 2023 09:56:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672649801; bh=iE8Wlj/0hC5YyHccvtTl9+pliRX37kC3l2MoouGdyIw=; h=From:To:Cc:Subject:Date:From; b=B1aRohCmgr7cpmdyE/bpyG22zmyAUajdHyJzWJ4S+eTPcM9zeGXaY4pMUnfwcFya3 YetKRZuQ86Qkh4ljcCGUb+n6tVmIfmi+L/RKCrzasJ7KzPWvkZ708qXT0WWDxinIWw xNNJ2BOg076BhAID8IYq0aXbR9YbGNkdDW15VOp4UCZL/BBUbgXJWecSLxMT3zhY9i VMAspiraRCSyRmQT2iPwyJS52cdhy7F/klKW3H+3FYBxNp75kVdS1bfSI0HFExNmxj 0drQbWjukZTfCNvhrio6JPDyQ7jbZIl7WrE4KlPv2xaQrFQ+eTAllEQXVHDtK6wtrb bU+Rvd9F3JMuA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NlqVK0jNLz9rxG; Mon, 2 Jan 2023 09:56:40 +0100 (CET) From: Ihor Radchenko To: Eli Zaretskii Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented In-Reply-To: <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> <83tu1a2wbv.fsf@gnu.org> Date: Mon, 02 Jan 2023 08:57:11 +0000 Message-ID: <875ydp5n6g.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399-done Cc: 60399-done@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > 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. This is pretty much what is being done: I try to hook into isearch code to (1) when isearch is about to display the match, I save the old overlays and re-arrange them to display the match as needed; (2) when isearch moves to the next match, I restore the old overlays. However, because isearch expects the overlays to exist even upon revealing the isearch match, I cannot achieve what I want. Even though my code would work fine, isearch itself errs in `isearch-close-unnecessary-overlays'/`isearch-open-necessary-overlays' where it does additional checks involving `overlay-start' and `overlay-end' that must be non-nil. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 02 07:29:40 2023 Received: (at 60399-done) by debbugs.gnu.org; 2 Jan 2023 12:29:40 +0000 Received: from localhost ([127.0.0.1]:42658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCJwh-00056h-QT for submit@debbugs.gnu.org; Mon, 02 Jan 2023 07:29:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCJwf-00056S-7o for 60399-done@debbugs.gnu.org; Mon, 02 Jan 2023 07:29:37 -0500 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 1pCJwZ-0001k2-6T; Mon, 02 Jan 2023 07:29:31 -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=tPf80LWZG7d/4dcWt1W9cT+rSNRydmiJvEPZ6/ZVDQs=; b=lTIV/aCqMOqU lNQVNDQZPRacN9Adgxqpgg2lBVgkYZYM2NKjuy/O3jaqzNxZagwKXp0czIUy2KDc9t2aAxiNeisTf OFTxh+gVM5yanosjPwcQ10zQeMzIfx6O1zXOw1sBfhw4tk4UDTCxsvFrjuH4uwkGUPv4nLmyuVvuR qLR1DjbkcY8J2B+pmYR9mHmPJrZZaK/aB8WrpTZcvUR+eFatpPbe+dJNkviHxllu3qZTzwXOMD1tY fJFNsZupnP5T5SPqKaHN5VnbkWe41Y8kqGAhpzUsjMEF681qGYkXwqjogA+5ReNrbh1ginmm8d9gu 9pmOTkDOdmx6bo0Qom4qtg==; 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 1pCJwQ-00077n-Ma; Mon, 02 Jan 2023 07:29:30 -0500 Date: Mon, 02 Jan 2023 14:29:29 +0200 Message-Id: <83zgb115na.fsf@gnu.org> From: Eli Zaretskii To: Ihor Radchenko , Stefan Monnier In-Reply-To: <875ydp5n6g.fsf@localhost> (message from Ihor Radchenko on Mon, 02 Jan 2023 08:57:11 +0000) Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented 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> <83tu1a2wbv.fsf@gnu.org> <875ydp5n6g.fsf@localhost> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399-done Cc: 60399-done@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ihor Radchenko > Cc: juri@linkov.net, 60399-done@debbugs.gnu.org > Date: Mon, 02 Jan 2023 08:57:11 +0000 > > Eli Zaretskii writes: > > > 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. > > This is pretty much what is being done: I try to hook into isearch code > to (1) when isearch is about to display the match, I save the old > overlays and re-arrange them to display the match as needed; (2) when > isearch moves to the next match, I restore the old overlays. > > However, because isearch expects the overlays to exist even upon > revealing the isearch match, I cannot achieve what I want. Even though > my code would work fine, isearch itself errs in > `isearch-close-unnecessary-overlays'/`isearch-open-necessary-overlays' > where it does additional checks involving `overlay-start' and > `overlay-end' that must be non-nil. I guess it's a bug in open/close-unnecessary-overlays, then? I'm not really sure I understand their role here. Juri, Stefan, can you help out? From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 02 10:41:42 2023 Received: (at 60399) by debbugs.gnu.org; 2 Jan 2023 15:41:42 +0000 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 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 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) 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== 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) From: Stefan Monnier To: Ihor Radchenko Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented In-Reply-To: <87bkni8lk3.fsf@localhost> (Ihor Radchenko's message of "Sun, 01 Jan 2023 12:51:40 +0000") 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> Date: Mon, 02 Jan 2023 10:34:27 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.334 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399 Cc: 60399-done@debbugs.gnu.org, Eli Zaretskii , 60399@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 04:01:58 2023 Received: (at 60399) by debbugs.gnu.org; 3 Jan 2023 09:01:58 +0000 Received: from localhost ([127.0.0.1]:44690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCdBG-0002A1-2v for submit@debbugs.gnu.org; Tue, 03 Jan 2023 04:01:58 -0500 Received: from mout02.posteo.de ([185.67.36.66]:49751) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCdBD-00029h-M9 for 60399@debbugs.gnu.org; Tue, 03 Jan 2023 04:01:56 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AED4824032C for <60399@debbugs.gnu.org>; Tue, 3 Jan 2023 10:01:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1672736509; bh=IopIZpCUIV/G3OAp60hy/GES1PU4Pk10V7CGrp3AHM4=; h=From:To:Cc:Subject:Date:From; b=iWEwUbKktPw3LyUzIKQ2sJuztPlrYFpHYAzBo7j1MALw4dKxq8xpwaZ0y3EirFdei pVq2s9gh117ow0CCA50/VDJpjFXcu/qFhQrEe51MeWVmBrGK+clvYhsSh5beI/QBs3 WQgeAx5VDODRhJ+4wJJgOtoD373LA1bb0Bp3lckHORGpd7jPjwEQSSl58GNufnxMOi n+e9p/6sAnIzdHJXpA8nKLF5WQGNt2KGsJxmmLiM50SwhaKmELVBNSp39SEHrZFHfB lkqGTEM/kohnIcT850DFVXk4YEwQZaX2NgAsK0HgwR4D27sOnAPxio7Z0P3jRJpQ+R aMJenbOWGmKrw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NmRYj27pFz9rxT; Tue, 3 Jan 2023 10:01:44 +0100 (CET) From: Ihor Radchenko To: Stefan Monnier Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented In-Reply-To: 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> Date: Tue, 03 Jan 2023 09:02:14 +0000 Message-ID: <87mt70kn3d.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399 Cc: 60399-done@debbugs.gnu.org, Eli Zaretskii , 60399@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Stefan Monnier 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 . Support Org development at , or support my work at From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 03 09:14:40 2023 Received: (at 60399) by debbugs.gnu.org; 3 Jan 2023 14:14:40 +0000 Received: from localhost ([127.0.0.1]:45005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCi3s-0006oa-19 for submit@debbugs.gnu.org; Tue, 03 Jan 2023 09:14:40 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pCi3n-0006oF-9M; Tue, 03 Jan 2023 09:14:38 -0500 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C65AB4410F3; Tue, 3 Jan 2023 09:14:28 -0500 (EST) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B3D644400EA; Tue, 3 Jan 2023 09:14:26 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1672755266; bh=Ggz3SB2yranz7uKORCVLJl1ACVQu8/dCfQ7565feOgo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=hdC4RRXtO0n8eYLNDbId+sgpQJejjElVTsVnqm+ymjNchuoszlGkv/Eq2AdeSeysY fqB6hv6B/m5L3Yh3K+PHiLyO5BI5JHOxO4X+VfrT+NwuEHGzVIJUmONrCcanpdDnlW +VsuQvAMrAyCPLEqNjVb5BqQ3dfYx8lcPJdfqgp6S4d6JHlkvr51r/H7xmtqXEkouW 7yCG8WH1Hc0qv0U29Xm3XG9RhuNVJPVGtXE/KT99E7aHDH6eM3tx9whOPwk5KpJJbp 3ZYNkNAt4HMTpFELwMt77JXjiEpwQAIrl4TjcP9tHDvEvlfo9wLmC/6ZFLNXcOvkvJ XRPk79BrOfoEw== Received: from pastel (unknown [45.72.200.228]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 865BC12043B; Tue, 3 Jan 2023 09:14:26 -0500 (EST) From: Stefan Monnier To: Ihor Radchenko Subject: Re: bug#60399: 30.0.50; Usage of `isearch-open-invisible-temporary' is not documented In-Reply-To: <87mt70kn3d.fsf@localhost> (Ihor Radchenko's message of "Tue, 03 Jan 2023 09:02:14 +0000") 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> <87mt70kn3d.fsf@localhost> Date: Tue, 03 Jan 2023 09:14:20 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.325 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60399 Cc: 60399-done@debbugs.gnu.org, Eli Zaretskii , 60399@debbugs.gnu.org, juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> 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 question is not just what to close but *when*. Isearch need to tell your code when it thinks you can close. It's natural to use the overlay's boundaries to decide when to do that, and it's natural to use that overlay as "the info about what to close" when i calls you back. I'm not claiming it's perfect or ideal. It's just a fairly natural choice. Note that in `reveal.el` I use a similar API but with a twist: after calling `reveal-toggle-invisible`, `reveal.el` checks whether the points we're interested in have been made visible and if not, we take the (new) overlays and repeat. This way, to get the behavior you say you want for Org (which we get in `outline-mode` with `reveal-mode`) we just arrange for `reveal-toggle-invisible` to show the headings "one level down" (and re-hide everything else): if that's not enough, `reveal.el` then calls `reveal-toggle-invisible` inside one of the subheadings until we're at the actual leaf. This addresses a major shortcoming of the `isearch-open-invisible-temporary' which is that the function is not told which part of the overlay needs to be opened. The best the function can do is presume that `point` is the thing of interest, but it's not specified anywhere (and in the case of `reveal.el` it's not sufficient because we may have several points to reveal at the same time). >> `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. There's a misunderstanding here: `outline-reveal-toggle-invisible` reveals only the immediate children. All it reveals is basically: (outline-show-entry) (outline-show-children) -- Stefan From unknown Sun Jun 15 08:36:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 01 Feb 2023 12:24:15 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator