Eli Zaretskii writes: >> From: Kévin Le Gouguec >> Date: Sun, 19 Dec 2021 13:10:37 +0100 >> Cc: 52587@debbugs.gnu.org, Rudolf Adamkovič >> >> 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: