Run Racket code blocks within Org mode buffers:
#+BEGIN_SRC racket
#lang racket
(printf "Hello World")
#+END_SRC
#+RESULTS:
: Hello World
Simplest case of running a code block is supported :)
It is possible to set the racket language to be used within the buffer
by setting :lang
. This can be useful to set the lang to be used
throughout the same Org buffer by setting a global property:
#+property: header-args :lang racket
#+BEGIN_SRC racket
(printf "Hello world")
#+END_SRC
#+RESULTS:
: Hello world
Tables and variable passing via :var
not supported yet.
- Get Racket mode
- Enable Racket code blocks execution and path to racket binary
(org-babel-do-load-languages 'org-babel-load-languages '((racket . t))) (setq org-babel-racket-command "/usr/local/bin/racket")
- Put
ob-racket.el
within thecontrib/lisp/
folder of your Org mode distribution - That should be it :)