Closed tyr898 closed 3 years ago
All Racket Mode uses sh-heredoc-face
for is the default value for its face, racket-here-string-face
:
(defface-racket racket-here-string-face
'((t (:inherit sh-heredoc-face)))
"Face for here strings."
"Here String Face")
So:
To work around this, probably you could M-x customize-face
, enter racket-here-string-face
, and give it some other value?
In Emacs 25.2.2 M-x describe-face
sh-heredoc-face
says:
sh-heredoc-face is an alias for the face ‘sh-heredoc’.
This face is obsolete since 22.1; use ‘sh-heredoc’ instead.
Because sh-script.el
has:
(define-obsolete-face-alias 'sh-heredoc-face 'sh-heredoc "22.1")
(defvar sh-heredoc-face 'sh-heredoc)
And there is no problem.
Presumably in Emacs 27.1 or earlier, someone decided to remove that and let things break.
If so:
Shame on sh-script.el
for making this alias so it would keep working... then just yanking it away for AFAICT no good reason.
Shame on me for using the sh-heredoc-face
instead of sh-heredoc
. I never noticed due to the alias. I'll push a commit to change that.
Possibly that org-html-htmlize-generate-css
function should more-gracefully handle faces that don't exist (in which case they can't be used, and CSS for them can't matter, IIUC?).
If you're only reading these comments via email, I pasted the wrong code snip above and edited that, just now.
I merged a commit, which auto-closed this issue.
It may take awhile to flow through to MELPA. Also, you might need to restart Emacs for the new definition of racket-here-string-face
to take effect; in my experience such settings don't necessarily refresh from a package update.
Meanwhile/instead the work-around should help:
To work around this, probably you could
M-x customize-face
, enterracket-here-string-face
, and give it some other value?
But if not, please let me know and feel free to re-open this issue.
Also, I'm curious: Did this happen when you were trying to "html-ize" a racket-mode
buffer, and, was there actually a Racket "here string" in the buffer -- was racket-here-string-face
actually being used in the buffer?
I don't know whether org-html-htmlize-generate-css
enumerates all faces that could be used, or just those actually used. I'm not sure if matters, I'm just curious.
It may take awhile to flow through to MELPA. Also, you might need to restart Emacs for the new definition of racket-here-string-face to take effect; in my experience such settings don't necessarily refresh from a package update.
Alright, I'll check back in a couple days, doesn't seem to be working yet though (also restarted Emacs).
Also, I'm curious: Did this happen when you were trying to "html-ize" a racket-mode buffer, and, was there actually a Racket "here string" in the buffer -- was racket-here-string-face actually being used in the buffer?
I first tried doing this in Org mode actually, not racket-mode. I had a block as so:
#+BEGIN_SRC racket
(define (random-fun) ...)
#+END_SRC
Tried doing this in a Racket Mode buffer as well, same thing happened however.
Also, no I wasn't using Racket here-strings. In fact I had to look up the meaning of heredocs to get to this page: https://en.wikipedia.org/wiki/Here_document where Racket is explicitly mentioned, fortunately enough.
So yes, it seems org-html-htmlize-generate-css
does enumerate all faces.
Thanks for the quick fix.
Doing
org-html-htmlize-generate-css
gives the(error "Invalid face" sh-heredoc-face)
. This command is supposed to create CSS files for org exports (to website, etc). It seemssh-heredoc-face
is being used in Racket which is outdated (?). There may be other faces but this is the first one that preventsorg-html-htmlize-generate-css
from doing its job.This is the entire stack trace for the error: