Gilles Marait <gilles.mar...@inria.fr> writes:

> Hi Igor,
>
> Thanks for your answer. 
> Yes, with org 9.6, I end up with two code.cpp as your said, one in "." and 
> one in "src".
>
> I think the line you're pointing to is indeed the problem

This is a bit tricky.

The new behavior is not exactly a bug - you just relied upon
undocumented behavior of `org-babel-tangle-publish' not cleaning up the
tangled files.

On the other hand, I can see tangled files being removed during
publishing as unexpected - what if the same set of files is used for
actual tangling (e.g. of config files). In such scenario, the configs
will be moved, potentially breaking workflows.

IMHO, it makes more sense to preserve _and also document_ (in the
docstring) the old behavior. We just need to make sure that the bug
fixed in 478576749d does not re-surface - when publishing directory is
"." the old code failed trying to copy tangled file into self.

I think that we can simply call `org-publish-attachment' on every
tangled file in `org-babel-tangle-publish' - `org-publish-attachment'
takes care about the situation when the tangled file is already in the
publishing dir.

Would you be interested to submit a patch fixing the issue as I described?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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>

Reply via email to