From: Cletip Cletip <clement020302@gmail.com>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: [BUG] Tangle with symbolic links don't work
Date: Mon, 6 Nov 2023 17:08:21 +0100 [thread overview]
Message-ID: <CAPHku6O9NfVMAfmE3_ahmpJea_2Qm0mJMFX6qPpT8uiQ94KMZA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]
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.
[-- Attachment #2: Type: text/html, Size: 1271 bytes --]
next reply other threads:[~2023-11-06 16:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-06 16:08 Cletip Cletip [this message]
2023-11-06 16:17 ` [BUG] Tangle with symbolic links don't work Ihor Radchenko
2023-11-07 10:55 ` Max Nikulin
2023-11-07 11:30 ` Ihor Radchenko
2023-11-20 9:55 ` Cletip Cletip
2023-12-04 12:58 ` Ihor Radchenko
2023-12-15 11:26 ` Ihor Radchenko
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=CAPHku6O9NfVMAfmE3_ahmpJea_2Qm0mJMFX6qPpT8uiQ94KMZA@mail.gmail.com \
--to=clement020302@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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.