Hi,I am using emacs 27.1 andorg-plus-contrib 20201026.
I am having problems with the fontification ofpython
andipython
source blocks when the code contains curly brackets "{}" (other course blocks are ok). For instance, the following snippet#+BEGIN_SRC python :results drawer import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.show() a=1 print("a={}".format{a}) #+END_SRC
does not fontify correctly in either
python
oripython
source blocks.As a consequence, when exporting the org file to HTML (C-c C-e h h), it fails with the following message:
font-lock-fontify-keywords-region: Invalid function: #<subr progn>
If changing the code snippet to:
#+BEGIN_SRC python :results drawer import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.show() a=1 print("a=%s" % a) #+END_SRC
the block fontifies and the file is exported to HTML correctly.
Can you reproduce this behaviour?
Many thanks in advance!