Subject: Re: bug#53981: 28.0.91; shortdoc: Add support for outline-minor-mode

From: Kévin Le Gouguec <[email-masked]>
Date: Tue, 15 Feb 2022 08:32:07 +0100

Lars Ingebrigtsen <[email-masked]> writes:

> But then hiding levels made the display pretty weird:

Looking at your screenshot, this reminds me of the discussion we're
having on bug#52587?  See in particular the three screenshots in

<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52587#19>
<<[email-masked]>>

I.e. given this outline buffer:

<https://debbugs.gnu.org/cgi/bugreport.cgi?att=1;filename=unfolded.png;msg=19;bug=52587>

The current folding causes this:

<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52587;msg=19;filename=folded-current.png;att=3>

Whereas it looks like this would be more useful:

<https://debbugs.gnu.org/cgi/bugreport.cgi?att=5;msg=19;filename=folded-requested.png;bug=52587>

IOW, instead of eliding everything from the heading's end-of-line
(included) to the section's last end-of-line (*excluded*, so its
font-locking clashes with the heading line), we would like to elide
everything *after* the heading's end-of-line (*including* the section's
last end-of-line).

I have not found the time to dig into outline.el to understand how this
could be pulled off yet.  FWIW though, issues such as the one we're
seeing now with shortdoc comfort me in the idea that this is a
fundamental problem with outline.el (although a mostly aesthetic one,
granted).

<tangent>

  I'm also reminded of bug#51016, where we debated whether FORM FEEDs
  belonged in outline-regexp; I'm seeing a pattern with shortdoc's
  separator lines, and I wonder if outline.el should grow a concept of
  "section separators".

  That would allow us to stop conflating FORM FEEDs with level-1
  headings, letting outline-forward-same-level do DTRT, yet keeping the
  ^L displayed even when folding all top-level headings, which IIRC was
  a contentious issue in that bug report

</tangent>