GNU bug report logs - #41062
27.0.91; Overlay with background face only applies to text (different behavior than in Emacs 26)

Previous Next

Package: emacs;

Reported by: David Engster <deng <at> randomsample.de>

Date: Sun, 3 May 2020 20:33:02 UTC

Severity: normal

Found in version 27.0.91

Done: David Engster <deng <at> randomsample.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41062 in the body.
You can then email your comments to 41062 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#41062; Package emacs. (Sun, 03 May 2020 20:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to David Engster <deng <at> randomsample.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 03 May 2020 20:33:02 GMT) Full text and rfc822 format available.

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

From: David Engster <deng <at> randomsample.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.91; Overlay with background face only applies to text
 (different behavior than in Emacs 26)
Date: Sun, 03 May 2020 22:32:31 +0200
[Message part 1 (text/plain, inline)]
I noticed a pretty big change how overlays are handled that apply a
face with a background color.

Reproduce as follows:

- emacs -Q

- Put in the scratch buffer:

(defface blue-background
  '((default :background "blue"))
  "blue background")
(setq testov (make-overlay (point-min) (point-max) nil t t))
(overlay-put testov 'face 'blue-background)

- M-x eval-buffer

In Emacs 26, you would see *everything* with a blue background until
(point-max), meaning the blue background would span the whole width of
the window, including the parts without text.

In current Emacs 27.0.91, you see blue background only applied to the
textual parts of the window. The parts without any text have the normal
background color. I have attached screenshots for both cases.

This is on GNU/Linux with Emacs26/27 both compiled from their latest
branches with GTK+ 3.24.5 and plain './configure' (no cairo).

I'm not sure if this is a bug or a deliberate change, but I couldn't
find anything in NEWS mentioning this.

-David

[emacs26-overlay.png (image/png, attachment)]
[emacs27-overlay.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#41062; Package emacs. (Sun, 03 May 2020 21:35:01 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: David Engster <deng <at> randomsample.de>
Cc: 41062 <at> debbugs.gnu.org
Subject: Re: bug#41062: 27.0.91; Overlay with background face only applies
 to text (different behavior than in Emacs 26)
Date: Sun, 03 May 2020 23:33:54 +0200
On Sun, 03 May 2020 22:32:31 +0200 David Engster <deng <at> randomsample.de> wrote:

> I noticed a pretty big change how overlays are handled that apply a
> face with a background color.
>
> Reproduce as follows:
>
> - emacs -Q
>
> - Put in the scratch buffer:
>
> (defface blue-background
>   '((default :background "blue"))
>   "blue background")
> (setq testov (make-overlay (point-min) (point-max) nil t t))
> (overlay-put testov 'face 'blue-background)
>
> - M-x eval-buffer
>
> In Emacs 26, you would see *everything* with a blue background until
> (point-max), meaning the blue background would span the whole width of
> the window, including the parts without text.
>
> In current Emacs 27.0.91, you see blue background only applied to the
> textual parts of the window. The parts without any text have the normal
> background color. I have attached screenshots for both cases.
>
> This is on GNU/Linux with Emacs26/27 both compiled from their latest
> branches with GTK+ 3.24.5 and plain './configure' (no cairo).
>
> I'm not sure if this is a bug or a deliberate change, but I couldn't
> find anything in NEWS mentioning this.

Write the defface like this:

(defface blue-background
  '((default :background "blue" :extend t))
  "blue background")

See NEWS in Emacs 27:

* Changes in Emacs 27.1
[...]
** New face attribute ':extend' to control face extension at EOL.
The new face attribute ':extend' controls whether to use the face for
displaying the empty space beyond end of line (EOL) till the edge of
the window.  By default, this attribute is non-nil only for a small
number of faces, notably, 'region'; any other face that crosses end of
line will not affect the display of the empty space at EOL.  This is
to make Emacs behave more like other GUI applications with respect to
displaying faces that cross line boundaries.

This attribute behaves specially when theme definitions are applied:
if the theme doesn't specify an explicit value of this attribute for a
face, the value from the original face definition is inherited.
Consequently, a theme generally shouldn't specify this attribute
unless it has a good reason to do so.

Steve Berman




Reply sent to David Engster <deng <at> randomsample.de>:
You have taken responsibility. (Sun, 03 May 2020 21:39:02 GMT) Full text and rfc822 format available.

Notification sent to David Engster <deng <at> randomsample.de>:
bug acknowledged by developer. (Sun, 03 May 2020 21:39:02 GMT) Full text and rfc822 format available.

Message #13 received at 41062-close <at> debbugs.gnu.org (full text, mbox):

From: David Engster <deng <at> randomsample.de>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 41062-close <at> debbugs.gnu.org
Subject: Re: bug#41062: 27.0.91; Overlay with background face only applies
 to text (different behavior than in Emacs 26)
Date: Sun, 03 May 2020 23:38:18 +0200
> See NEWS in Emacs 27:
>
> * Changes in Emacs 27.1
> [...]
> ** New face attribute ':extend' to control face extension at EOL.

[...]

Thank you! I only searched for 'overlay' and 'background' and didn't
check for 'face'...

I am closing this. Sorry for the noise.

-David




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 01 Jun 2020 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 21 days ago.

Previous Next


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