0

org-babel allows editing source code of arbitrary modes inside an .org file.

I'd like to do this (with different syntactic markers) inside my major mode, but org-babel is very specific to org.

Is there a library that allows one to embed major modes (at least the font-locks) inside a code block in another major mode? Otherwise I guess I need to copy/pasta the relevant parts of org-babel.

fommil
  • 1,750
  • 11
  • 24
  • Please add some more info - in which way it should behave different from org-babel? What to keep? – Andreas Röhler Oct 26 '18 at 06:15
  • I don't know what to add. I basically want org-babel inside my major mode. e.g. say I have a SQL string embedded in my source code (with some special markers, say `$$$`, not `BEGIN_SRC`), I want to be able to use sql-mode font-locks in there. – fommil Oct 26 '18 at 08:34

1 Answers1

1

Maybe try the following packages:

https://github.com/purcell/mmm-mode

https://github.com/polymode/polymode

resp.

https://polymode.github.io/

WRT to literate programming this seems worth to look at too:

https://github.com/alphapapa/outorg

Andreas Röhler
  • 1,894
  • 10
  • 10