From unknown Sat Sep 20 03:14:08 2025 X-Loop: help-debbugs@gnu.org Subject: bug#78673: outline-revert-buffer-restore-visibility modifies visibility Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: monnier@iro.umontreal.ca, juri@linkov.net, bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Jun 2025 18:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 78673 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 78673@debbugs.gnu.org Cc: monnier@iro.umontreal.ca, Juri Linkov X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: monnier@iro.umontreal.ca, Juri Linkov Received: via spool by submit@debbugs.gnu.org id=B.174888801330514 (code B ref -1); Mon, 02 Jun 2025 18:14:01 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jun 2025 18:13:33 +0000 Received: from localhost ([127.0.0.1]:54509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uM9fB-0007w5-14 for submit@debbugs.gnu.org; Mon, 02 Jun 2025 14:13:33 -0400 Received: from lists.gnu.org ([2001:470:142::17]:39306) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uM9f8-0007um-Gj for submit@debbugs.gnu.org; Mon, 02 Jun 2025 14:13:31 -0400 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 1uM9et-0001zC-1h for bug-gnu-emacs@gnu.org; Mon, 02 Jun 2025 14:13:16 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uM9er-0002F1-5q for bug-gnu-emacs@gnu.org; Mon, 02 Jun 2025 14:13:14 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 31874807A8 for ; Mon, 2 Jun 2025 14:13:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1748887984; bh=Vwy47WrXauiZKXe7FzURCaVuYjACfZgVjN8HmH2rJqk=; h=From:To:Subject:Date:From; b=COugLhUwdAFzpLDmy4C8TSZaagRt4tDYv9+dBkw43i2p1sCQ5fQpYH7mc7JSUwkyy gaO3ePkSMec5i1JcL33cMKbwbGnkUCJlNBXf4rQ+xu1LB5rbO/1hhbiOgBb9iiHOgZ eVfy09vE8ukYdCn82t/dj/GqMJU7CGFxVHvLO+loA/l5q/EsHLMAOloKRRVijmDVth Y7crkyR2Pb8M0WUIIH/1jSi2YjrOR9dEHubJthk+2t7jIYAOAOLdqObl5sr+X/JcBX 0c1N6BzMy1spXALSHAbbju/W55n1kY4rbNWEMYhzeV3ntlWQJC8CZD8xqVEk+jkI+s SP9n1hfnD/SRg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1E6F480898 for ; Mon, 2 Jun 2025 14:13:04 -0400 (EDT) Received: from alfajor (modemcable005.21-80-70.mc.videotron.ca [70.80.21.5]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id F12C1120401 for ; Mon, 2 Jun 2025 14:13:03 -0400 (EDT) From: Stefan Monnier Date: Mon, 02 Jun 2025 14:13:02 -0400 Message-ID: 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.223 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 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) 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.0 (-) Package: Emacs Version: 31.0.50 While playing in bug#78665 I noticed the following bug: src/emacs -Q lisp/transient.el -f outline-minor-mode M-: (hide-sublevels 1000) RET M-: (funcall (outline-revert-buffer-restore-visibility)) RET Notice that after the first `M-:` all the definitions' first lines are visible (and their bodies are hidden), whereas after the second `M-:` only the `;;;` headings are visible and none of the actual code. This seems to be due to the design of this save&restore code which presumes that all the hiding is applied always to whole subtrees. Stefan From unknown Sat Sep 20 03:14:08 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Stefan Monnier Subject: bug#78673: closed (Re: bug#78665: 31.0.50; Very slow saves) Message-ID: References: X-Gnu-PR-Message: they-closed 78673 X-Gnu-PR-Package: emacs Reply-To: 78673@debbugs.gnu.org Date: Wed, 04 Jun 2025 20:41:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1749069663-1534-1" This is a multi-part message in MIME format... ------------=_1749069663-1534-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #78673: outline-revert-buffer-restore-visibility modifies visibility which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 78673@debbugs.gnu.org. --=20 78673: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78673 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1749069663-1534-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 78673-done) by debbugs.gnu.org; 4 Jun 2025 20:40:54 +0000 Received: from localhost ([127.0.0.1]:53383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uMuuq-0000MP-Fd for submit@debbugs.gnu.org; Wed, 04 Jun 2025 16:40:53 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56485) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uMuui-0000KZ-TY; Wed, 04 Jun 2025 16:40:45 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E4AAE10013E; Wed, 4 Jun 2025 16:40:38 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1749069638; bh=SPCAr8u5jeezX6t/ryRFnRPWrzwRHW16kb2gaJoOblk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=e2e51YEvYiq+11ZH3IeM8dXCRmICji9nuR8kQgjSDTZS1oYBGb1iUsE9oKQ7uIk5U DbBIo2Rc7e5/kwDLnMfM3v4nXo9N7uQ6wn6LNHV4kYLUUNzzid2x/tU3fE5D6pJa16 yELg8XowscQ3YH/RS4JOqmFxZD+yqS6CS5PJZhA0UrUMqGY/JiaA27Bdzt3Lks3Dkj 3ujeT6bShyRdh8mhETZjnNdjX1rKS/lCFT3alIb3ZW9csLqdINkg2kPS1WSuHoTeTj 7aiy/+ClhCcHltn3cyNGeatwmMmTAPk+D9tW/MxncXATWSQC4G+FTUwIfDy3exyqBQ zUbP1Qc4+Jlzw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0E00D10006B; Wed, 4 Jun 2025 16:40:38 -0400 (EDT) Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id CD2651203B6; Wed, 4 Jun 2025 16:40:37 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#78665: 31.0.50; Very slow saves In-Reply-To: <875xhbph4c.fsf@mail.linkov.net> Message-ID: References: <86r002ptc2.fsf@gnu.org> <867c1up3st.fsf@gnu.org> <87frgg7st6.fsf@mail.linkov.net> <875xhbph4c.fsf@mail.linkov.net> Date: Wed, 04 Jun 2025 16:40:36 -0400 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.217 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 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 78673-done Cc: 78673-done@debbugs.gnu.org, Eli Zaretskii , Jonas Bernoulli , 78665-done@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 (---) > I've completed testing your patch and found no problems. Thanks, pushed to `master`, Stefan ------------=_1749069663-1534-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Jun 2025 18:13:33 +0000 Received: from localhost ([127.0.0.1]:54509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uM9fB-0007w5-14 for submit@debbugs.gnu.org; Mon, 02 Jun 2025 14:13:33 -0400 Received: from lists.gnu.org ([2001:470:142::17]:39306) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uM9f8-0007um-Gj for submit@debbugs.gnu.org; Mon, 02 Jun 2025 14:13:31 -0400 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 1uM9et-0001zC-1h for bug-gnu-emacs@gnu.org; Mon, 02 Jun 2025 14:13:16 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uM9er-0002F1-5q for bug-gnu-emacs@gnu.org; Mon, 02 Jun 2025 14:13:14 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 31874807A8 for ; Mon, 2 Jun 2025 14:13:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1748887984; bh=Vwy47WrXauiZKXe7FzURCaVuYjACfZgVjN8HmH2rJqk=; h=From:To:Subject:Date:From; b=COugLhUwdAFzpLDmy4C8TSZaagRt4tDYv9+dBkw43i2p1sCQ5fQpYH7mc7JSUwkyy gaO3ePkSMec5i1JcL33cMKbwbGnkUCJlNBXf4rQ+xu1LB5rbO/1hhbiOgBb9iiHOgZ eVfy09vE8ukYdCn82t/dj/GqMJU7CGFxVHvLO+loA/l5q/EsHLMAOloKRRVijmDVth Y7crkyR2Pb8M0WUIIH/1jSi2YjrOR9dEHubJthk+2t7jIYAOAOLdqObl5sr+X/JcBX 0c1N6BzMy1spXALSHAbbju/W55n1kY4rbNWEMYhzeV3ntlWQJC8CZD8xqVEk+jkI+s SP9n1hfnD/SRg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1E6F480898 for ; Mon, 2 Jun 2025 14:13:04 -0400 (EDT) Received: from alfajor (modemcable005.21-80-70.mc.videotron.ca [70.80.21.5]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id F12C1120401 for ; Mon, 2 Jun 2025 14:13:03 -0400 (EDT) From: Stefan Monnier To: bug-gnu-emacs@gnu.org Subject: outline-revert-buffer-restore-visibility modifies visibility X-Debbugs-Cc: monnier@iro.umontreal.ca, Juri Linkov Date: Mon, 02 Jun 2025 14:13:02 -0400 Message-ID: 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.223 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 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain X-SPAM-LEVEL: Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) 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: -1.0 (-) Package: Emacs Version: 31.0.50 While playing in bug#78665 I noticed the following bug: src/emacs -Q lisp/transient.el -f outline-minor-mode M-: (hide-sublevels 1000) RET M-: (funcall (outline-revert-buffer-restore-visibility)) RET Notice that after the first `M-:` all the definitions' first lines are visible (and their bodies are hidden), whereas after the second `M-:` only the `;;;` headings are visible and none of the actual code. This seems to be due to the design of this save&restore code which presumes that all the hiding is applied always to whole subtrees. Stefan ------------=_1749069663-1534-1--