emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] Tangle with symbolic links don't work


From: Cletip Cletip
Subject: [BUG] Tangle with symbolic links don't work
Date: Mon, 6 Nov 2023 17:08:21 +0100

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]