I have this in my init.el
to enable block code syntax highlighting in org-mode:
(setq org-src-fontify-natively t)
I have also this for org-babel
:
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(ditaa . t)))
when I insert source code < s followed by TAB to draw something using ditaa (same problem with emacs-lisp
code, it seems to be a general SRC code block problem), the syntax highlighting breaks when I write this line:
#+BEGIN_SRC ditaa :file "./foo.png" :cmdline -r
No syntax highlighting but code can be evaluated
However, when I leave only #+BEGIN_SRC
sitting alone in the first line I get the highlighting right, but code will not be evaluated in this case when I hit C-c C-c
. Even one space after SRC
is enough to break that syntax highlighting. What is going on? Can anyone help me fix it?
Syntax highlighting is right but code cannot be evaluated
Note
- GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-17 on lgw01-04, modified by Debian)
- GNU Emacs 25.1.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-09-29; nothing changed.
- Org mode version 9.0.4 (release_9.0.4-248-gdef8a8)
- Org mode version 9.0.5 (release_9.0.5-288-g4caad0) problem presists
- theme used is
moe-dark
Update
When I run emacs --vanilla
from the terminal, the problem disappears. So what is going on? What to do next to find the cause from here?