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: Mon, 20 Dec 2021 07:33:07 +0100	[thread overview]
Message-ID: <87fsqnvl98.fsf@gmail.com> (raw)
In-Reply-To: <83h7b491x2.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 19 Dec 2021 15:09:29 +0200")

[-- Attachment #1: Type: text/plain, Size: 1544 bytes --]

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 #2: unfolded.png --]
[-- Type: image/png, Size: 45789 bytes --]

[-- Attachment #3: Type: text/plain, Size: 33 bytes --]


Folding should not yield this:


[-- Attachment #4: folded-current.png --]
[-- Type: image/png, Size: 46093 bytes --]

[-- Attachment #5: Type: text/plain, Size: 19 bytes --]


But rather that:


[-- Attachment #6: folded-requested.png --]
[-- Type: image/png, Size: 43594 bytes --]

  reply	other threads:[~2021-12-20  6:33 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 [this message]
2021-12-20 10:22         ` Lars Ingebrigtsen
2021-12-20 17:07         ` Eli Zaretskii
2021-12-21  7:29           ` Kévin Le Gouguec
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=87fsqnvl98.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).