From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Using org-babel in other modes? Date: Sun, 09 Oct 2011 20:08:51 -0400 Message-ID: <8739f1g12k.fsf@norang.ca> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RD3Qa-0001Ie-V4 for emacs-orgmode@gnu.org; Sun, 09 Oct 2011 20:09:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RD3QZ-0002Ec-IY for emacs-orgmode@gnu.org; Sun, 09 Oct 2011 20:09:08 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:23782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RD3QZ-0002E5-F4 for emacs-orgmode@gnu.org; Sun, 09 Oct 2011 20:09:07 -0400 In-Reply-To: (Dave Abrahams's message of "Sun, 09 Oct 2011 17:44:44 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dave Abrahams Cc: emacs-orgmode@gnu.org Dave Abrahams 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