[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Using org-babel in other modes?
From: |
Bernt Hansen |
Subject: |
Re: [O] Using org-babel in other modes? |
Date: |
Sun, 09 Oct 2011 20:08:51 -0400 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux) |
Dave Abrahams <address@hidden> 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