GNU bug report logs - #52587
29.0.50; Wrong block header/footer background in Org

Previous Next

Package: org-mode;

Reported by: Rudolf Adamkovič <salutis <at> me.com>

Date: Fri, 17 Dec 2021 21:15:01 UTC

Severity: normal

Tags: fixed, moreinfo

Found in version 29.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, salutis <at> me.com, 52587 <at> debbugs.gnu.org
Subject: Re: bug#52587: 29.0.50; Wrong block header/footer background in Org
Date: Tue, 21 Dec 2021 08:29:10 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
>> Cc: larsi <at> gnus.org,  salutis <at> me.com,  52587 <at> 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/




This bug report was last modified 1 year and 118 days ago.

Previous Next


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