I'm trying to use noweb to do literate programming, using mmm-noweb from mmm-mode. The mode is supposed to do syntax highlighting of both LaTeX and some other programming language (in my case Python) in different parts of the program.
The syntax highlighting doesn't work correctly when the package pyvenv is enabled in the python layer. The syntax highlighting works correctly in other languages inside noweb, like Lua.
Reproduction guide :beetle:
Add the noweb private layer. In ~/.emacs.d/private/noweb/packages.el write:
If the markdown layer (which owns mmm-mode) isn't enabled, post-init-mmm-mode isn't run for some reason. I'm not sure if this is expected behaviour.
Create noweb file, test.nw:
% -*- mmm-noweb-code-mode: python-mode -*-
test
<<*>>=
if a < b:
return 4
@
bla bla
Restart Spacemacs and open test.nw
Observed behaviour: :eyes: :broken_heart:
There is no syntax highlighting for the Python bit image1. In addition, when the point
is in the Python bit, the mode stays as LaTeX/MPSimage2, compare mode with image1.
Expected behaviour: :heart: :smile:
There is proper syntax highlighting for both Python and LaTeX image1. When the point is
in a LaTeX region, the major mode is LaTeX/MPS. When it is in a Python region,
the mode is LaTeX/MPS[Python]image2, compare mode with image1.
You can reproduce this behaviour by commenting out pyvenv in the python-packages list in ~/.emacs.d/layers/+lang/python/packages.el.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!
Description :octocat:
I'm trying to use noweb to do literate programming, using
mmm-noweb
frommmm-mode
. The mode is supposed to do syntax highlighting of both LaTeX and some other programming language (in my case Python) in different parts of the program.The syntax highlighting doesn't work correctly when the package
pyvenv
is enabled in thepython
layer. The syntax highlighting works correctly in other languages inside noweb, like Lua.Reproduction guide :beetle:
noweb
private layer. In~/.emacs.d/private/noweb/packages.el
write:If the
markdown
layer (which ownsmmm-mode
) isn't enabled,post-init-mmm-mode
isn't run for some reason. I'm not sure if this is expected behaviour.test.nw
:test.nw
Observed behaviour: :eyes: :broken_heart:
There is no syntax highlighting for the Python bit image1. In addition, when the point is in the Python bit, the mode stays as
LaTeX/MPS
image2, compare mode with image1.Expected behaviour: :heart: :smile:
There is proper syntax highlighting for both Python and LaTeX image1. When the point is in a LaTeX region, the major mode is
LaTeX/MPS
. When it is in a Python region, the mode isLaTeX/MPS[Python]
image2, compare mode with image1.You can reproduce this behaviour by commenting out
pyvenv
in thepython-packages
list in~/.emacs.d/layers/+lang/python/packages.el
.System Info :computer: