Org Mode ES2015+ Code Blocks (updated)

Babel 6x is a significant change from Babel 5x, as the cli is now a separate node module called babel-cli and transforms are now also delivered as separate packages. First make a few changes to the emacs environment so you can use JavaScript in org mode, as well as find local node.js modules you have installed. Replace ~/org/node_modules in the configuration below with the location of any local node modules you want to use. Using this approach you don't have to pollute the global node_module directory if you don't want to.

#+begin_src js :cmd "org-babel-node" :results output drawer
  let arr = [1, 2]; 
  let [x, y] = arr;



[Read More]

Org Mode ES2015+ Code Blocks

Update: I have updated instructions for installing and using the recently released Babel 6 with org mode. I use emacs org mode to keep notes including code nodes that support inline execution. It is convenient for keeping useful code snippets, as well as experimenting while taking notes. Because of features like Org + Deft it is really easy to find the sweet spot between keeping coding notes organized but also easily searched. [Read More]