From mboxrd@z Thu Jan 1 00:00:00 1970 From: zwz Subject: Re: Using org-babel in other modes? Date: Mon, 10 Oct 2011 15:39:35 +0800 Message-ID: <87y5wtwb0o.fsf@gmail.com> References: <8739f1g12k.fsf@norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDAMI-0004Cz-S9 for emacs-orgmode@gnu.org; Mon, 10 Oct 2011 03:33:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDAMH-0001oI-BM for emacs-orgmode@gnu.org; Mon, 10 Oct 2011 03:33:10 -0400 Received: from lo.gmane.org ([80.91.229.12]:38660) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDAMH-0001lU-6D for emacs-orgmode@gnu.org; Mon, 10 Oct 2011 03:33:09 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RDAMF-0003Pj-AE for emacs-orgmode@gnu.org; Mon, 10 Oct 2011 09:33:07 +0200 Received: from 60.191.28.52 ([60.191.28.52]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Oct 2011 09:33:07 +0200 Received: from zhangweize by 60.191.28.52 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Oct 2011 09:33:07 +0200 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: emacs-orgmode@gnu.org Bernt Hansen writes: > 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: > > (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))) > > This enables fundamental-mode when I C-c ' on a plantuml block > > #+begin_src plantuml :file foo.png > > #+end_src Hey Bernt, there is a plantuml-mode. Just google it. ;) > > > Does that help? > > Regards, > Bernt