GNU bug report logs - #79286
outline-mode: attempting to open folded sections does not work as expected inside a deeply nested header

Previous Next

Package: emacs;

Reported by: James Cherti <contact <at> jamescherti.com>

Date: Thu, 21 Aug 2025 18:10:02 UTC

Severity: normal

Full log


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

From: James Cherti <contact <at> jamescherti.com>
To: bug-gnu-emacs <at> gnu.org
Subject: outline-mode: attempting to open folded sections does not work as
 expected inside a deeply nested header
Date: Thu, 21 Aug 2025 14:08:49 -0400
When using outline-mode or outline-minor-mode, attempting to
open folded sections (outline-show-entry) does not work as
expected when the cursor is positioned inside a deeply
nested header.

Steps to Reproduce:
-------------------
1. Open an outline-mode buffer with multiple
   nested headers, for example:
--8<---------------cut here---------------start------------->8---
Level 1
** Level 2
*** Level 3
**** Level 4: A
Some content here
Some content here
Some content here
Some content here
**** Level 4: B
Some content here
Some content here
Some content here
Some content here
**** Level 4: C
Some content here
Some content here< PUT THE CURSOR HERE
Some content here
Some content here
**** Level 4: D
Some content here
Some content here
Some content here
Some content here
Some content here
**** Level 4: E
Some content here
Some content here
Some content here
--8<---------------cut here---------------start------------->8---

2. Put the cursor before `< PUT THE CURSOR HERE`

3. Collapse all folds with: (hide-sublevels 1)

6. Show entry: (outline-show-entry)

The folds fail to expand fully in nested hierarchies, leaving all 
content hidden except for `level 4: C`.

Screenshot: 
https://github.com/user-attachments/assets/2ea6c3bd-0284-40a7-90e5-1619bdf3acc5

Expected Behavior:
------------------
The expected behavior is that only the heading at point (and
its associated content) should be expanded, while all
ancestor headings remain collapsed. (Similar to other editors.)

Actual Behavior:
----------------
Only the heading at point expands, while other headings
remain invisible, which is confusing. In some cases, these
hidden headings cannot be revealed until the parent heading
is first collapsed and then expanded again.

Environment:
------------
* Emacs version: 30.2 and master branch 
(ade6608e2587452c8ea565ce3057879379ebd0b5)

--
James Cherti
GitHub: https://github.com/jamescherti
Website: https://www.jamescherti.com/




This bug report was last modified 29 days ago.

Previous Next


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