[go: nahoru, domu]

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 box error in org-modern--update-label-face after Emacs@30 update #161

Closed
LuciusChen opened this issue Dec 1, 2023 · 5 comments

Comments

@LuciusChen
Copy link

Describe the Issue

After the latest update(commit dcd755dabcf9ef95d6d0534c11c668f44c6f89c2) to Emacs@30, the org-modern--update-label-face function in the org-modern plugin seems to generate an invalid :box attribute value, causing the redisplay function to throw an error.

Error Message

redisplay--pre-redisplay-functions: (error "Invalid face box" :color "#f6fff9" :line-width (0 . -3))
@minad
Copy link
Owner
minad commented Dec 1, 2023

Can you please report this problem upstream? A line-width of 0 should not necessarily be considered invalid, since we may want to draw a border around text only above/below or to the left/right of the text.

@minad
Copy link
Owner
minad commented Dec 1, 2023

I've looked into this and it seems that 0 should have never been allowed, see https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-11/msg01236.html. It is a bit unfortunate since we lose styling opportunities this way and there is no real reason why 0 should be disallowed. The display code works even for 0. :(

@jdtsmith
Copy link
Contributor
jdtsmith commented Dec 3, 2023

I just encountered this same bug on master while testing other things:

Debugger entered--Lisp error: (error "Invalid face box" :color "#287a287a287a" :line-width (0 . -3))
  set-face-attribute(org-modern-label nil :box (:color "#287a287a287a" :line-width (0 . -3)))
  org-modern--update-label-face()
  org-modern--pre-redisplay(#<window 3 on test2.org>)
  run-hook-with-args(org-modern--pre-redisplay #<window 3 on test2.org>)
  redisplay--pre-redisplay-functions(t)
  redisplay_internal\ \(C\ function\)()

@minad
Copy link
Owner
minad commented Dec 3, 2023

@jdtsmith The issue is fixed in org-modern 1.1.

@mrdylanyin
Copy link

@minad In Emacs 30.92, I face the issue

redisplay--pre-redisplay-functions: (error "Invalid face box" :color "#242730" :line-width (-1 . -0.3))

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

4 participants