unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#41062: 27.0.91; Overlay with background face only applies to text (different behavior than in Emacs 26)
@ 2020-05-03 20:32 David Engster
  2020-05-03 21:33 ` Stephen Berman
  0 siblings, 1 reply; 3+ messages in thread
From: David Engster @ 2020-05-03 20:32 UTC (permalink / raw)
  To: 41062

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

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


[-- Attachment #2: emacs26-overlay.png --]
[-- Type: image/png, Size: 46151 bytes --]

[-- Attachment #3: emacs27-overlay.png --]
[-- Type: image/png, Size: 46411 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#41062: 27.0.91; Overlay with background face only applies to text (different behavior than in Emacs 26)
  2020-05-03 20:32 bug#41062: 27.0.91; Overlay with background face only applies to text (different behavior than in Emacs 26) David Engster
@ 2020-05-03 21:33 ` Stephen Berman
  2020-05-03 21:38   ` David Engster
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Berman @ 2020-05-03 21:33 UTC (permalink / raw)
  To: David Engster; +Cc: 41062

On Sun, 03 May 2020 22:32:31 +0200 David Engster <deng@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





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#41062: 27.0.91; Overlay with background face only applies to text (different behavior than in Emacs 26)
  2020-05-03 21:33 ` Stephen Berman
@ 2020-05-03 21:38   ` David Engster
  0 siblings, 0 replies; 3+ messages in thread
From: David Engster @ 2020-05-03 21:38 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 41062-close

> 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





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-03 21:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-03 20:32 bug#41062: 27.0.91; Overlay with background face only applies to text (different behavior than in Emacs 26) David Engster
2020-05-03 21:33 ` Stephen Berman
2020-05-03 21:38   ` David Engster

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).