Closed LuciusChen closed 11 months ago
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.
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. :(
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\)()
@jdtsmith The issue is fixed in org-modern 1.1.
@minad In Emacs 30.92, I face the issue
redisplay--pre-redisplay-functions: (error "Invalid face box" :color "#242730" :line-width (-1 . -0.3))
Describe the Issue
After the latest update(commit
dcd755dabcf9ef95d6d0534c11c668f44c6f89c2
) to Emacs@30, theorg-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