Org Executables

Over the weekend, the 2021 EmacsConf took place and presented a slue of great talks. Irreal will mention at least a couple of them starting with Tom Gillespie’s astounding talk on how to make Org files executable.

The first question is what does it mean to make an Org file executable? The TL;DR is that you add some boiler plate to the Org file so that you can call it as if it were a shell script. The resulting file works under all the common shells including, even, powershell. That turns out to be harder than you might think but happily Gillespie has made the process essentially turnkey.

He has added a package to Melpa to initialize an org file with all the needed boiler plate so that all one has to do is add the code block to implement whatever the script is intended to do. You can get all the details from the video of the talk or from the transcript of it. Both are available at the above link.

The video it short—only 7 minutes, 9 seconds—so it should be easy to fit in. People are always asking how to make Elisp programs executable without explicitly calling Emacs. Gillespie’s package lets you do this almost automatically. Take a look at the video; you have nothing to lose but seven minutes.

This entry was posted in General and tagged , . Bookmark the permalink.