Kévin Le Gouguec writes: >>> AFAICT, this is the simplest way to fix org-fontify-whole-heading-line >>> and org-fontify-whole-block-delimiter-line for Emacs ≥27. These user >>> options work under the assumption that simply fontifying the final >>> newline is enough to extend attributes past EOL. >> >> Nevertheless, I would like to see the :extend attribute applied only >> under the above options; there's the set-face-extend function for >> doing that. > > OK. That's more or less what I had in mind when I went into my > "long-term fix" ideas. > > Note that Org tries to support older Emacs versions. AFAICT, with my > patch, (1) org-fontify-whole-heading-line is fixed for Emacs 27, (2) no > further modification is needed for Emacs ≤26. > > I can try to cook up a patch based on set-face-extend instead, with all > the fboundp fun that entails to prevent byte-compiler warnings with > older Emacs versions. I'm not sure where the calls to set-face-extend > should be inserted; when setting up the major mode? Since all the other threads I'm following are stalled, I've taken a stab at this: