I'm want to export php code snippets to html in org-mode. But as you see signs : '$' and '->' are highlighted by black color which looks terrible. Is it a some kind of error? Btw. is there any themes for highlighting code exported by org-mode?
1 Answer
The issue is probably caused by your theme, which sets the background color for these syntaxes. The easiest way to check whether that's the case is to put the point on an offending character in the buffer, and typing M-x describe-char
. If the cause turns out to be the background color, it will be listed in face properties. The reason why it's visible in HTML is because Emacs doesn't set the background color of code blocks in HTML export.
You can verify whether the default theme works properly by starting Emacs with no init file (emacs -Q
) and loading just the bare minimum (without your theme) to verify that things work properly without it.
-
It drives me nuts. I was trying to change it in describe-char menu, but it dosen't work. Those elements: '$' '->' always innherit background from theme. How I can turn it off ?– slk500Feb 5, 2019 at 20:15
-
You could try looking whether your theme defines background for some syntaxes or something like that.– user12563Feb 6, 2019 at 17:01
-
Finally with your help I removed that background. As you said @DoMiNeLa10
describe-char
then (php-variable-sigil org-block) -> Face: php-variable-sigil (sample) (customize this face) and have to unchecked Inherit from PHP Mode. I was wondering why precise those two signs: '$' and '->' inherit from PHP Mode? Do you think it is some kind of bug? Maybe I should fix this in the PHP Mode package?– slk500Feb 7, 2019 at 11:07
describe-char
.