From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#71284: 30.0.50; [PATCH] Add support for outline-minor-mode to Eshell Date: Sun, 02 Jun 2024 09:37:08 +0300 Organization: LINKOV.NET Message-ID: <86frtvrgtn.fsf@mail.linkov.net> References: <048207b3-4d91-34cd-8e2d-ccf41b7bd832@gmail.com> <868qzq1n3r.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39297"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: 71284@debbugs.gnu.org To: Jim Porter Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 02 08:52:23 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sDf4o-000A75-Oe for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Jun 2024 08:52:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDf4K-0008T0-65; Sun, 02 Jun 2024 02:51:52 -0400 Original-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 1sDf4I-0008S9-Mv for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 02:51:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sDf4I-0004O4-Em for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 02:51:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sDf4U-0007x9-Fr for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2024 02:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jun 2024 06:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71284 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 71284-submit@debbugs.gnu.org id=B71284.171731107830490 (code B ref 71284); Sun, 02 Jun 2024 06:52:02 +0000 Original-Received: (at 71284) by debbugs.gnu.org; 2 Jun 2024 06:51:18 +0000 Original-Received: from localhost ([127.0.0.1]:57715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDf3l-0007vi-TU for submit@debbugs.gnu.org; Sun, 02 Jun 2024 02:51:18 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:55217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDf3j-0007vR-T0 for 71284@debbugs.gnu.org; Sun, 02 Jun 2024 02:51:16 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id D5EFCE0002; Sun, 2 Jun 2024 06:50:36 +0000 (UTC) In-Reply-To: (Jim Porter's message of "Fri, 31 May 2024 13:02:00 -0700") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286367 Archived-At: >>> 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?