Subject: Re: bug#71284: 30.0.50; [PATCH] Add support for outline-minor-mode to Eshell

From: Juri Linkov <[email-masked]>
Date: Sun, 02 Jun 2024 09:37:08 +0300

>>> This patch adds support for outline-minor-mode to Eshell. When enabled,
>>> this will just add outline buttons to the prompt (as the top level), and
>>> one to the start of the output (as level 2).
> ...
> The main case I'm trying to account for is collapsing the command
> output. I think the most consistent way for Eshell is to make the "heading"
> always be the first line of the output, even if that line is empty. That
> way, the arrow button is always in the same spot (immediately after the
> prompt/input), and if the output had many leading empty lines, you can
> collapse all of them to save space (to be fair, this case probably isn't
> super-common).

Sorry, I still don't understand why do you need two levels.
Is it because in Eshell prompts are often multi-line?

IIUC, with two levels, the case when the output is empty has such problems
that one line will contain two outline headers, that also means
two conflicting margin arrows on the same line?

> For prompts, this isn't as important, since a single-line prompt should
> always have some visible text. For multi-line prompts, it would be possible
> to treat the heading as the first non-empty line, but that would be
> additional work on the Eshell side, and I think we'd still need the
> outline.el changes to handle collapsing the command output. (Improving
> heading-detection for multi-line prompts could always be done in a later
> bug, too.)

So the outline.el changes are required only to handle empty output lines?
That essentially means adding support for two outline headers
on the same line?