emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Tangle with symbolic links don't work
@ 2023-11-06 16:08 Cletip Cletip
  2023-11-06 16:17 ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Cletip Cletip @ 2023-11-06 16:08 UTC (permalink / raw)
  To: Org Mode List

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-15 11:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 16:08 [BUG] Tangle with symbolic links don't work Cletip Cletip
2023-11-06 16:17 ` 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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).