protesilaos / spacious-padding

Increase the padding/spacing of GNU Emacs frames and windows.
GNU General Public License v3.0
59 stars 2 forks source link

Weird visual glitches when using emacs server. #13

Closed tusharhero closed 2 months ago

tusharhero commented 2 months ago

Hey @protesilaos, thank you for this amazing package.

Problem happens only when using emacs server and it doesn't occur when I start emacs without running a server.

Screenshots

image

Specifications

protesilaos commented 2 months ago

From: tusharhero @.***> Date: Thu, 25 Apr 2024 23:44:07 -0700

Hey @protesilaos, thank you for this amazing package.

You are welcome!

Problem happens only when using emacs server and it doesn't occur when I start emacs without running a server.

Screenshots

image

So you are starting Emacs without 'server-mode'? Or is this still an emacsclient?

-- Protesilaos Stavrou https://protesilaos.com

tusharhero commented 2 months ago

I use this command to run the emacsclient with a server: emacsclient -nc -a '' And this command to just run emacs: emacs

protesilaos commented 2 months ago

Does this issue go away if you re-enable spacious-padding-mode? Or is something else involved that sets the :box attribute of the mode line?

I notice that the box does not come directly from the theme (which looks like modus-operandi-deuteranopia) because the theme would/should set a colour for the box. Whereas here we only have a box without an explicit colour, so we see each block extend its own colour to the box (see the -22 and the date).

tusharhero commented 2 months ago

It does go away if I re-enable spacious-padding-mode. I am not sure if something else is involved but here is a relevant portion of my init.el

  (setq custom-safe-themes t)
  (advice-add 'load-theme
              :before (lambda (theme &optional no-confirm no-enable)
                        (disable-theme (car custom-enabled-themes))))

The theme I am using is ef-frost.

protesilaos commented 2 months ago

From: tusharhero @.***> Date: Fri, 26 Apr 2024 20:52:42 -0700

It does go away if I re-enable spacious-padding-mode. I am not sure if something else is involved but here is a relevant portion of my init.el

Are you starting spacious-padding before or after loading the theme? Perhaps that is the issue.

[... 7 lines elided]

The theme I am using is ef-frost.

Okay, same idea for the :box as with the modus-themes (I use the warm night light and it distorts the colours...).

-- Protesilaos Stavrou https://protesilaos.com

tusharhero commented 2 months ago

Spacious padding is enabled before I load the theme.

protesilaos commented 2 months ago

From: tusharhero @.***> Date: Fri, 26 Apr 2024 21:06:34 -0700

Spacious padding is enabled before I load the theme.

Try to change that order. Because now spacious-padding does not read the colours of your theme at startup.

-- Protesilaos Stavrou https://protesilaos.com

tusharhero commented 2 months ago

I tried changing the order, it doesn't seem to change much.

nuthub commented 2 months ago

In my *Messages* I see:

Unable to load color "unspecified-bg"

I'm also using modus-operandi.

Does this issue go away if you re-enable spacious-padding-mode? Or is something else involved that sets the :box attribute of the mode line?

For me disabling and enabling spacious-padding-mode works around that issue. This issue also only occurs when running emacs --daemon and then opening an emacsclient.

protesilaos commented 2 months ago

From: Julian Flake @.***> Date: Sun, 28 Apr 2024 04:12:53 -0700

[... 7 lines elided]

Does this issue go away if you re-enable spacious-padding-mode? Or is something else involved that sets the :box attribute of the mode line?

For me disabling and enabling spacious-padding-mode works around that issue.

Yes, this is the expected behaviour. After a frame exists and a theme is available, the "unspecified-bg" is no longer there. We get the correct value.

Let me check how best to work around this.

-- Protesilaos Stavrou https://protesilaos.com

protesilaos commented 2 months ago

I just added a change. Please let me know if this works for you.

tusharhero commented 2 months ago

Hey @protesilaos, unfortunately your fix doesn't seem to work for me.

tusharhero commented 2 months ago

I just noticed that creating a new frame by running emacsclient -nc -a '' fixes it. But it doesn't work the first time I run emacsclient -nc -a ''.

The first time I run emacsclient -nc -a'', it starts the emacs server if its not running. I think that may have something to do with it.

nuthub commented 2 months ago

Also not fixed for me. I start emacs exactly like tusharhero, but it doesn't make a difference, if I start emacs --daemon and emacsclient -nc separately instead.

nuthub commented 2 months ago

Ah, opening a second frame then fixes the glitch with both frames (which is new behaviour, if I remember correctly)!

tusharhero commented 2 months ago

Ah, opening a second frame then fixes the glitch with both frames (which is new behaviour, if I remember correctly)!

Yup, even I noticed this.

protesilaos commented 2 months ago

I pushed another change. Can you please try again?

protesilaos commented 2 months ago

This is what I get.

Screenshot from 2024-04-29 09-42-26

nuthub commented 2 months ago

fixed with af8030e ! 🥳 Thank You!

tusharhero commented 2 months ago

Fixed for me too!

protesilaos commented 2 months ago

Very well! I am waiting for another issue and will then prepare the new release.