> I agree that it will make things simpler in terms of implementation. > Note that it will also make detangling less portable (you will not be > able to move the files around). That said, it is acceptable given the > required complexity to support relative paths with multiple tangle > targets. It’s a trade-off, but it’s the best solution I can think of for keeping compatibility with other parts of Org mode.
> Note that you reset BLOCKS on every dolist iteration. That looks not right. Yes—BLOCKS should be reset each time. Every new block requires regrouping all existing ones, so rebuilding BLOCKS in each iteration is intentional. Please check the updated patch. llcc On Sat, Nov 22, 2025 at 11:25 PM Ihor Radchenko <[email protected]> wrote: > > Lei Zhe <[email protected]> writes: > > >> > I still think that returning bare only is the simplest and safest > >> > solution for now if :tangle has multiple targets in > >> > `org-babel-tangle--unbracketed-link', then we > >> > can leave everything else unchanged. > >> > >> Do I understand correctly that your suggestion is to deprecate > >> org-babel-tangle-use-relative-file-links? > > > > No, my proposal is to return the relative path only if :tangle has one > > single target; Otherwise, return the absolute path. > > I agree that it will make things simpler in terms of implementation. > Note that it will also make detangling less portable (you will not be > able to move the files around). That said, it is acceptable given the > required complexity to support relative paths with multiple tangle > targets. > > If you do go this approach, please document the limitations in the > `org-babel-tangle-use-relative-file-links' docstring. > > -- > Ihor Radchenko // yantar92, > Org mode maintainer, > Learn more about Org mode at <https://orgmode.org/>. > Support Org development at <https://liberapay.com/org-mode>, > or support my work at <https://liberapay.com/yantar92>
0001-ob-tangle.el-Support-tangling-a-source-block-to-mult.patch
Description: Binary data
