Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid face attribute :background nil #15

Closed
Jousimies opened this issue Nov 20, 2021 · 6 comments
Closed

Invalid face attribute :background nil #15

Jousimies opened this issue Nov 20, 2021 · 6 comments

Comments

@Jousimies
Copy link

Jousimies commented Nov 20, 2021

The Invalid face attribute :background nil error increase with mouse scroll
My config:

(leaf modus-themes
      :doc "https://protesilaos.com/modus-themes/"
      :load-path "~/.emacs.d/site-lisp/packages/modus-themes"
      :require t
      :commands (modus-themes-load-themes)
      :custom ((modus-themes-italic-constructs . t)
	       (modus-themes-bold-constructs . nil)
	       (modus-themes-region . '(bg-only no-extend))
	       (modus-themes-lang-checkers . '(background text-also straight-underline))
	       (modus-themes-links . '(faint))
	       (modus-themes-mode-line . '(accented borderless)))
      :init
      ;; Load the theme files before enabling a theme
      (modus-themes-load-themes)
      )

image

@protesilaos
Copy link
Owner

Hello @Jousimies and thanks for taking the time to report this.

I cannot reproduce this on my end. These are the steps I followed:

  1. In a shell prompt type emacs -Q
  2. Insert the following in the scratch buffer:
(require 'modus-themes "~/.emacs.d/site-lisp/packages/modus-themes/modus-themes.el") ; check the path
(setq modus-themes-italic-constructs t)
(setq modus-themes-bold-constructs nil)
(setq modus-themes-region '(bg-only no-extend))
(setq modus-themes-lang-checkers '(background text-also straight-underline))
(setq modus-themes-links '(faint))
(setq modus-themes-mode-line '(accented borderless))

(modus-themes-load-themes)

(load-theme 'modus-operandi t)
  1. Run M-x eval-buffer
  2. Now show the buffer with the echo area messages with C-h e.
  3. Try to scroll up and down.

2021-11-20_12:17:39_1920x1080

Can you try those steps and let me know if you get the same results as I do?

If you do, then there must be something wrong with another package that you use and how it expects some background value that does not exist. Maybe there still is something in the themes, but we need to determine what produces the error.

protesilaos added a commit that referenced this issue Nov 20, 2021
Same as commit 45fa1ec.  In short: we do not want a nil value, as code
which unconditionally checks for it will throw errors.

This may relate to issue 15 on the Github mirror, as reported by
Jousimies: <#15>.
@protesilaos
Copy link
Owner

I think I found the problem on the side of the themes. I pushed the changes. Though there still may be another package involved.

@Jousimies
Copy link
Author

@protesilaos Thank you for your help. I found the problem related to the centaur-tabs package.

@protesilaos
Copy link
Owner

Very well! If you can pinpoint it, then we should report it to the centaur-tabs maintainer so that other users do not experience similar problems.

Also, I would be curious to know what it is, just so I can learn what to expect next time something similar happens.

@jeremyf
Copy link

jeremyf commented May 14, 2022

@Jousimies do you have the solution for this; I'm seeing it in my build as well.

@protesilaos
Copy link
Owner

@jeremyf I am trying to fix the problem upstream: ema2159/centaur-tabs#179. Basically, the way centaur-tabs' faces are designed right now prevent us from using :inherit (which is something that themes should be able to do).

Relevant issue in the GitLab mirror: https://gitlab.com/protesilaos/modus-themes/-/issues/288

protesilaos added a commit that referenced this issue Aug 2, 2022
centaur-tabs has a bug where it cannot read the value of a face if it
uses the standard ':inherit' attribute.  I have sent a patch to fix it,
but have received no response since February:
<ema2159/centaur-tabs#179>.

Relevant reports:

- <#30>
- <https://gitlab.com/protesilaos/modus-themes/-/issues/288>
- <#15>

I am happy to reinstate support for centaur-tabs as soon as the package
gets the maintenance it needs.
protesilaos added a commit that referenced this issue Sep 20, 2022
I had removed support for centaur-tabs in commit 2235ce5 (done on
2022-08-02).  I wrote:

    centaur-tabs has a bug where it cannot read the value of a face if it
    uses the standard ':inherit' attribute.  I have sent a patch to fix it,
    but have received no response since February:
    <ema2159/centaur-tabs#179>.

    Relevant reports:

    - <#30>
    - <https://gitlab.com/protesilaos/modus-themes/-/issues/288>
    - <#15>

    I am happy to reinstate support for centaur-tabs as soon as the package
    gets the maintenance it needs.

My patch/pull-request is now merged and the package is actively
maintained once again.  Hence the decision to bring back support for it,
as promised.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants