bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52587: 29.0.50; Wrong block header/footer background in Org


From: Kévin Le Gouguec
Subject: bug#52587: 29.0.50; Wrong block header/footer background in Org
Date: Mon, 20 Dec 2021 07:33:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Kévin Le Gouguec <kevin.legouguec@gmail.com>
>> Date: Sun, 19 Dec 2021 13:10:37 +0100
>> Cc: 52587@debbugs.gnu.org, Rudolf Adamkovič <salutis@me.com>
>> 
>> 1. emacs -Q
>> 2. C-x b repro
>> 3. M-x outline-mode
>> 4. type in: "* foo RET bar RET * baz"
>> 5. move to "bar"
>> 6. M-: 
>>    (add-text-properties
>>     (point-at-bol)
>>     (1+ (point-at-eol))
>>     '(font-lock-face (:background "red")))
>> 7. S-TAB (to fold all sections)
>> 
>> Here, I see a single column with red background after the ellipses.
>
> Why is that a problem?  That single column has buffer position 10, and
> is the only visible buffer position that has the red color before
> S-TAB.
>
> So I think Emacs behaves as expected here.

>From an implementation POV, the current behaviour makes perfect sense,
yes, because outline-mode essentially hides everything ranging from the
newline at the end of "* foo" up to but *excluding* the newline after
"bar".

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.

To put it in picture in case that wasn't clear, assuming a derived mode
of Outline which would also fontify a headline's final newline, some
users expect that in this buffer:

Attachment: unfolded.png
Description: PNG image

Folding should not yield this:

Attachment: folded-current.png
Description: PNG image

But rather that:

Attachment: folded-requested.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]