unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, salutis@me.com, 52587@debbugs.gnu.org
Subject: bug#52587: 29.0.50; Wrong block header/footer background in Org
Date: Tue, 21 Dec 2021 08:29:10 +0100	[thread overview]
Message-ID: <87a6guo1q1.fsf@gmail.com> (raw)
In-Reply-To: <m2zgoz0wa2.fsf@me.com>

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Kévin Le Gouguec <kevin.legouguec@gmail.com>
>> Cc: larsi@gnus.org,  salutis@me.com,  52587@debbugs.gnu.org
>> Date: Mon, 20 Dec 2021 07:33:07 +0100
>> 
>> But I think this bug report shows that some users have different
>> expectations, rooted in an abstract sense of what is and is not "part"
>> of the subsection to hide.  Specifically, they consider that the
>> end-of-line decoration of a subsection's last line is "part" of the
>> subsection, and so expect it to be hidden when the subsection is folded.
>
> Which means the Lisp code which defines which parts are hidden should
> hide slightly different parts?  Because the display engine does its
> job perfectly here, and so do the faces: they do what you tell them to
> do.

That sounds about right; FWIW I'd imagine this to be fixed/worked around
either in outline-mode itself, or in derived modes which feature these
:extended :backgrounds.

> IOW, while I see your point, I don't think I understand how would you
> like this to be resolved.

I don't have a concrete implementation proposal yet (this itch has
remained stuck in my "minor enough that I'll let someone else file a
report" drawer ever since I discovered it; thanks Rudolf for the report
btw 😉).

On the "vague handwavy half-baked idea" front, I'd imagine that when
folding a headline's subsections, Outline could (1) check whether the
headline has :extended decorations at end-of-line (2) pull off some
shenanigans to "copy" these decorations onto the hidden content's final
newline (by hacking its {font-lock-,}face property or slapping a display
property on top of it maybe?), but that sounds pretty brittle.

On the "gazing at the other side of fence where the grass looks greener"
front, I wonder if there are things to learn from Jonas's
magit-section[1], which AFAICT quacks like outline-mode (i.e. lets users
define/show/hide/navigate arbitrarily nested hierarchies of subsections)
and does not seem to suffer from this problem despite making heavy use
of extended backgrounds.

The "actionable suggestion" front is late to the battlefield, sorry 😕


[1] Code:
    https://git.savannah.gnu.org/cgit/emacs/nongnu.git/plain/lisp/magit-section.el?h=elpa/magit-section
    Manual:
    https://magit.vc/manual/magit-section/





  reply	other threads:[~2021-12-21  7:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 21:13 bug#52587: 29.0.50; Wrong block header/footer background in Org Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-19 11:32 ` Lars Ingebrigtsen
2021-12-19 12:10   ` Kévin Le Gouguec
2021-12-19 13:09     ` Eli Zaretskii
2021-12-20  6:33       ` Kévin Le Gouguec
2021-12-20 10:22         ` Lars Ingebrigtsen
2021-12-20 17:07         ` Eli Zaretskii
2021-12-21  7:29           ` Kévin Le Gouguec [this message]
2021-12-20 22:16   ` Rudolf Adamkovič via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-12-21 10:03     ` Protesilaos Stavrou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a6guo1q1.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --cc=52587@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=salutis@me.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).