Hacker News new | ask | show | jobs
by copperx 1554 days ago
It would be great if IDEs supported literate programming; the tangle/weave commands, simple as they are, create many possible points for navigation. An IDE would be ideal to go back and forth from the prose to the code.
2 comments

I found this years ago: http://leoeditor.com/
Leo editor is my literate programming editor of choice.
It's the one editor I've found that has something that people have struggled to replicate in Emacs.
Yeah, detangling without markers and editable org transclusion blocks are needed.
You will be shocked to know that emacs and org-mode can do exactly this. You can tangle source, and go from the tangled source back to the section that generated that source.

If you are wanting to just do cweb, then the debugging symbols already let you step through the source line by line without having to look at the tangled source.

> You will be shocked to know that emacs and org-mode can do exactly this. You can tangle source, and go from the tangled source back to the section that generated that source.

If you actually use noweb and desire autocompletion or type reminders (or really anything an IDE does), then functionally it cannot. Literate programming (and noweb) is great for configs, but as set up it simply doesn't work right for real programming.

Orgmode can get you these things. Since the tangled source is full source, you will just have to index the tangled code and detangle after edits.

So, yes. The outline code will be less prone to this. But this is no different than the architecture document being ignored by the ide.

> If you actually use noweb and desire autocompletion or type reminders (or really anything an IDE does), then functionally it cannot.

dabbrev completes noweb-ref names and you can automate this with yasnippet.