4 ms·
> I absolutely hacked on the tangled source code of the program when trying to fix bugs or extend capabilities. Once I knew what I wanted to do I put it back in
by sundarurfriend 2y ago
> I absolutely hacked on the tangled source code of the program when trying to fix bugs or extend capabilities. Once I knew what I wanted to do I put it back in the literate program
Does NoWeb automate this "untangling" process in any way? I sometimes use Weave.jl [1] when I'm thinking out loud through code, and at times it would be nice to just work on the tangled code, refactor and reorganize things, and have it all untangle back into the original in some way. I have no idea how that would work though, and it would likely be pretty limited even if it existed, but I'm curious what the usual approach you take to this is.
[1] https://weavejl.mpastell.com/stable/ https://weavejl.mpastell.com/stable/
- llm_trw 2y agoNo, in noweb programs you insert chunks of code in multiple places and have conflicts when you try and automatically merge the code back too often. Org mode has a function which does this, but they didn't allow for arbitrary chunk nesting the last time I looked. Emacs has a number of very useful features in the modes for noweb/tex, one of which is jumping to the chunk which the code came from in the tangled source code on the pretty printed PDF. This follows the spirit of what you want. In fact SyncTeX support comes pretty much out of the box for noweb files and makes their editing a breeze, either as text or code. Of course if you're not on Emacs than god help you.
- textread 2y agoAre you using the following workflow? orgmode file --> export to pdf (aka weave) orgmode file --> org babel tangle Would you please help me understand your workflow for > jumping to the chunk which the code came from in the tangled source code on the pretty printed PDF Do the codeblocks in your pdfs contain hyperlinks back to the org file where they came from?
- llm_trw 2y agoNo I'm using noweb. There is an option in noweb to add comments in the tangled code with the line and file from which they originate. Then there's an Emacs mode that let's you jump to that code. I wrote a little function that let you instead jump to the line in the same like in pdf using SyncTeX.