From: Ihor Radchenko <yantar92@posteo.net>
To: Gilles Marait <gilles.marait@inria.fr>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>,
emmanuel agullo <emmanuel.agullo@inria.fr>
Subject: Re: Change behavior of "org-babel-tangle-publish" from org 9.6 to 9.7 -- deleting source files and not tangling properly
Date: Sun, 15 Sep 2024 11:05:40 +0000 [thread overview]
Message-ID: <878qvtkwhn.fsf@localhost> (raw)
In-Reply-To: <1781466320.35797146.1725958169824.JavaMail.zimbra@inria.fr>
Gilles Marait <gilles.marait@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>
prev parent reply other threads:[~2024-09-15 11:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-02 14:52 Change behavior of "org-babel-tangle-publish" from org 9.6 to 9.7 -- deleting source files and not tangling properly Gilles Marait
2024-09-09 17:40 ` Ihor Radchenko
2024-09-10 8:49 ` Gilles Marait
2024-09-15 11:05 ` Ihor Radchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878qvtkwhn.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=emmanuel.agullo@inria.fr \
--cc=gilles.marait@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.