Dave Abrahams <[email protected]> writes:
> Org-babel does a magic thing where you get to edit and view your source
> code blocks in their native modes. Wow!
>
> I also happen to use markdown-mode to write blog articles. How hard, on
> a scale from "read the source and figure it out" to "org-babel already
> has the hooks; you can do it in 5 minutes," would it be to integrate the
> org-babel stuff with markdown?
>
> Seems like this trick would be extremely useful for quite a few modes
> (RestructuredText, anyone?)
>
> Thanks,
Is it just a matter of defining the mode to use for some new source?
For plantuml I have the following:
--8<---------------cut here---------------start------------->8---
(org-babel-do-load-languages
(quote org-babel-load-languages)
(quote ((emacs-lisp . t)
(dot . t)
(ditaa . t)
(R . t)
(python . t)
(ruby . t)
(gnuplot . t)
(clojure . t)
(sh . t)
(ledger . t)
(org . t)
(plantuml . t)
(latex . t))))
(add-to-list 'org-src-lang-modes (quote ("plantuml" . fundamental)))
--8<---------------cut here---------------end--------------->8---
This enables fundamental-mode when I C-c ' on a plantuml block
#+begin_src plantuml :file foo.png
#+end_src
Does that help?
Regards,
Bernt