GNU bug report logs - #79848
[idea] Persistent folding for hideshow (and others)

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Sun, 16 Nov 2025 18:42:01 UTC

Severity: normal

To reply to this bug, email your comments to 79848 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#79848; Package emacs. (Sun, 16 Nov 2025 18:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Elijah Gabe Pérez <eg642616 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 16 Nov 2025 18:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: [idea] Persistent folding for hideshow (and others)
Date: Sun, 16 Nov 2025 12:41:14 -0600
A few days ago, someone sent me an FR to implement persistent folding
for hideshow.

While I am willing to help and implement this as much as I can, I think
we need to discuss this idea first.  I believe that this should not be
exclusive to hideshow, but should be used for other folding packages as
well.

I've had a few ideas about this:

1. Merge an existing package.
   There is a package called savefold.el that implements this idea.
   According to the repository, it only has two contributors (and one of
   them already has the copyright assigned AFAIK).  So I could ask the
   author if he agrees to merge his package into the core (with a few
   changes).

2. Implement it from scratch (if it is not possible to merge savefold.el).

3. Implement it only for hideshow.


What do you all think about this?

-- 
- E.G via Gnus and Org.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79848; Package emacs. (Sun, 16 Nov 2025 19:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 79848 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Elijah Gabe Pérez <eg642616 <at> gmail.com>
Cc: 79848 <at> debbugs.gnu.org
Subject: Re: bug#79848: [idea] Persistent folding for hideshow (and others)
Date: Sun, 16 Nov 2025 21:02:33 +0200
> A few days ago, someone sent me an FR to implement persistent folding
> for hideshow.
>
> While I am willing to help and implement this as much as I can, I think
> we need to discuss this idea first.  I believe that this should not be
> exclusive to hideshow, but should be used for other folding packages as
> well.
>
> I've had a few ideas about this:
>
> 1. Merge an existing package.
>    There is a package called savefold.el that implements this idea.
>    According to the repository, it only has two contributors (and one of
>    them already has the copyright assigned AFAIK).  So I could ask the
>    author if he agrees to merge his package into the core (with a few
>    changes).
>
> 2. Implement it from scratch (if it is not possible to merge savefold.el).
>
> 3. Implement it only for hideshow.
>
> What do you all think about this?

outline-minor-mode already implements persistent folding using
outline-revert-buffer-restore-visibility that is currently used
to restore previous folding after reverting the buffer.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79848; Package emacs. (Mon, 17 Nov 2025 03:48:01 GMT) Full text and rfc822 format available.

Message #11 received at 79848 <at> debbugs.gnu.org (full text, mbox):

From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 79848 <at> debbugs.gnu.org
Subject: Re: bug#79848: [idea] Persistent folding for hideshow (and others)
Date: Sun, 16 Nov 2025 21:47:44 -0600
Juri Linkov <juri <at> linkov.net> writes:

[...]

>> What do you all think about this?
>
> outline-minor-mode already implements persistent folding using
> outline-revert-buffer-restore-visibility that is currently used
> to restore previous folding after reverting the buffer.

I meant to save the state of hidden blocks ala saveplace.el, if I hide a
block in a file, close the file buffer, and reopen that file, it should
preserve the hidden blocks.

--
- E.G via Gnus and Org.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#79848; Package emacs. (Mon, 17 Nov 2025 07:24:02 GMT) Full text and rfc822 format available.

Message #14 received at 79848 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Elijah Gabe Pérez <eg642616 <at> gmail.com>
Cc: 79848 <at> debbugs.gnu.org
Subject: Re: bug#79848: [idea] Persistent folding for hideshow (and others)
Date: Mon, 17 Nov 2025 09:12:48 +0200
>> outline-minor-mode already implements persistent folding using
>> outline-revert-buffer-restore-visibility that is currently used
>> to restore previous folding after reverting the buffer.
>
> I meant to save the state of hidden blocks ala saveplace.el, if I hide a
> block in a file, close the file buffer, and reopen that file, it should
> preserve the hidden blocks.

'outline--hidden-headings-paths' returns a data structure
that can be saved in a file.




This bug report was last modified today.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.