emacs-noob · 2022-10-17 02:35
deerpig · 2022-10-17 03:49
I could see this being useful in a hybrid team environment where some people are working with source files directly in a repo and others are editing the code as part of a literate document. This would allow you to sync code in a literate document with an external code base....
yantar92 · 2022-10-17 12:15
Emm... What about `org-babel-detangle`?
paretoOptimalDev · 2022-10-17 13:14
Detangle is the right idea, but I recall sentinel values need to be present.
State of the art detangling as done in the Leo editor doesn't require sentinel values and uses:
https://leoeditor.com/appendices.html#the-mulder-ream-update-algorithm
OP implementing this atop org-babel-detangle might provide you an even nicer and more general solution.
yantar92 · 2022-10-17 13:22
If I recall correctly, you did mention this link in another reply. Note that this algorithm is not being used in the blog article. The article employs something even simpler than built-in org-babel-detangle
If you wish to improve detangling in Org, feel free to submit a patch :) See https://orgmode.org/worg/org-contribute.html
paretoOptimalDev · 2022-10-17 14:31
> If you wish to improve detangling in Org, feel free to submit a patch :) See https://orgmode.org/worg/org-contribute.html
My intentions are growing, I created a roam node for a project to enhance detangling in org and started writing a literate example of the current detangler :)
titanofold · 2022-10-17 19:37
If only this would import Jupyter notebooks....
emacs-noob · 2022-10-17 19:53
Thanks for the pointer, seems like Cunningham's law proves right again!
It seems from the org-babel-detangle docstring:
\> This requires that code blocks were tangled with link comments which enable the original code blocks to be found.
While this implementation is all about introducing NEW files into the project. Indeed my implementation doesn't do what detangle does at all, as it will ignore any files referenced by any source block.
yantar92 · 2022-10-18 01:43
I see. Then, you may also find https://github.com/alphapapa/outshine interesting