Hello everyone,
I'm reaching out to discuss a challenge I've encountered while working with Org-mode, specifically during the tangling process of code blocks.
The Issue:
I have an Org file,
test.org, from which I tangle code blocks into test.py. The complication arises because test.py is a symbolic link. Each time I perform the tangling operation, the symbolic link is unfortunately overwritten.
Interestingly, when exporting documents to formats such as .tex, .html, or others, Org-mode respects the symbolic link, which is the desired behavior. However, this is not the case with tangling, which is quite perplexing.
My Org mode version : 9.6.10 (9.6.10-n/a-g902975...)
Proposed Solution:
I've identified a potential fix that involves a minor adjustment in the ob-tangle.el file:
Original line (259):
(let ((file-name (car by-fn)))
Modified line:
(let ((file-name (file-truename (car by-fn))))
While this solution appears effective at first glance, I haven't extensively tested all edge cases. I would greatly appreciate your insights on whether this is a robust solution ^^.
Thanks in advance for your answer.