emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Dave Abrahams <dave@boostpro.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Using org-babel in other modes?
Date: Sun, 09 Oct 2011 20:08:51 -0400	[thread overview]
Message-ID: <8739f1g12k.fsf@norang.ca> (raw)
In-Reply-To: <m2obxpn8kz.fsf@pluto.luannocracy.com> (Dave Abrahams's message of "Sun, 09 Oct 2011 17:44:44 -0400")

Dave Abrahams <dave@boostpro.com> 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

  reply	other threads:[~2011-10-10  0:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-09 21:44 Using org-babel in other modes? Dave Abrahams
2011-10-10  0:08 ` Bernt Hansen [this message]
2011-10-10  0:52   ` Dave Abrahams
2011-10-10  1:00     ` Bernt Hansen
2011-10-10  7:39   ` zwz
2011-10-10 14:41 ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8739f1g12k.fsf@norang.ca \
    --to=bernt@norang.ca \
    --cc=dave@boostpro.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).