GNU bug report logs - #65896
30.0.50; folding text with text properties prevents background from extending past the newline

Previous Next

Package: emacs;

Reported by: StrawberryTea <look <at> strawberrytea.xyz>

Date: Tue, 12 Sep 2023 18:02:01 UTC

Severity: wishlist

Found in version 30.0.50

Done: Ihor Radchenko <yantar92 <at> posteo.net>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 65896 <at> debbugs.gnu.org, kevin.legouguec <at> gmail.com, look <at> strawberrytea.xyz
Subject: Re: bug#65896: 30.0.50; folding text with text properties prevents
 background from extending past the newline
Date: Sat, 23 Sep 2023 15:38:03 +0300
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: look <at> strawberrytea.xyz, 65896 <at> debbugs.gnu.org, kevin.legouguec <at> gmail.com
> Date: Sat, 23 Sep 2023 11:19:32 +0000
> 
> 1. emacs -Q
> 2. M-x org-mode
> 3. M-: (set-face-background 'org-block-end-line "lightblue")
> 4. Insert
> * Heading
> #+begin_src emacs-lisp
> 1
> #+end_src
> * Another heading
> 5. S-<TAB>
> 6. Observe * Heading...<blue background>

It's because the invisible text does not include the newline of the
#+end_src line, and that newline has the face you don't want to see.

If we ignore the face of the newline itself, we will change the
behavior when the last glyph before the newline has a different face.
The most notable use case is:

  . C-e
  . C-SPC
  . C-f

This is expected to paint with the region face the part between the
last glyph of the current line and the first glyph of the next line,
but with your proposal will not.  IOW, the region face will
effectively not be extended in this case.

Why cannot Org include in the invisible text the newline of the last
line that is being hidden?  That is, in the above scenario, make the
invisible text begin with the first character of "#+begin_src" and end
after the newline following "#+end_src".




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

Previous Next


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