Org-Babel

Published: September 3, 2021
Edited: October 14, 2021
Categories: code

Truly one of the greatest features of Org-Mode is Org-Babel, reconstructing the long fallen tower that we may be gifted with tongues once again.

It’s as easy as:

1
2
3
4
#+name: hello-elisp
#+begin_src emacs-lisp :exports results
(print "Hello, Babel!")
#+end_src

1
Hello, Babel!

That’s only the easy case of Emacs-Lisp1 but we can Go further

1
2
3
4
#+name: hello-go
#+begin_src go :imports fmt :exports both
fmt.Println("Hello, Babel!")
#+end_src

1
Hello, Babel!

And so the circle is complete, from my Emacs writing Go which is evaluated by Emacs-Lisp which is exported to and compiled by Hugo. Not to mention the several layers inbetween and on the ends.


  1. Which makes the workflow go ↩︎