Hacker News new | ask | show | jobs
by devsda 921 days ago
This approach is sometimes referred to as literate programming.

Emacs's org-babel package implements it for a variety of languages but only within org-mode files (.org).

You might be able to find a 3rd party package/script that works for you or you might find it easy to write/modify existing scripts depending on your particular use case.