org-babel support for Standard ML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Put ob-sml.el where it can be loaded by Emacs. For example I place it in a directory ~/.emacs.d/vendor which is automatically put on the load path with the following:

(let ((default-directory  "~/.emacs.d/vendor/"))

Then require it and make sure org-babel knows about it like so:

(require 'ob-sml nil 'noerror)

 '((clojure . t)
   (ruby . t)
   (scheme . t)
   (js . t)
   (haskell . t)
   (prolog . t)
   (sml . t) ;; added!

To test, create a new org-mode file such as Then add the following to this file:

ML for the Working Programmer

* Chapter 1
#+BEGIN_SRC sml :session *sml*
  fn n => n + 1

Start a sml REPL with M-x run-sml. You should now be able to place your cursor in the code block and evaluate with C-c C-c and the contents of your file should now look like:

* Chapter 1
#+BEGIN_SRC sml :session *sml*
  fn n => n + 1

: val it = fn : int -> int