Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Emacs Org Babel is amazing! I also was practicing awk examples from The AWK Programming Book few years back in a similar fashion: https://scripter.co/notes/awk/.

And it's not just awk, there are Org Babel packages available for virtually all the languages!

- Nim (these are my most comprehensive set of notes): https://scripter.co/notes/nim/

- Tcl: https://scripter.co/notes/tcl/

- String formatting in Nim and Python: https://scripter.co/notes/string-fns-nim-vs-python/

- PlantUML: https://scripter.co/notes/plantuml/

In all the notes pages above, the result of the code blocks is seen directly in the Emacs buffer when I hit C-c C-c. Then I simply* export all those notes to Markdown and publish them using Hugo.

* Tangent: That's one of the main reasons why I went down the path of developing ox-hugo.



do you have to install and configure each language into emacs or org mode? or is just having them in your system path enough?

I'll get into this if I don't have to twiddle with each one individually but I know emacs enough to suspect that's how it'll be.


No, having the related executable in the PATH before you start emacs is enough.

Then you need to install the Org Babel packages that don't ship with Emacs or Org mode e.g. ob-tcl, ob-nim.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: