emacs-orgmode
[Top][All Lists]
Advanced

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

[BUG] (org-babel-result-to-file) adds the relative path even if attachme


From: Johan Tolö
Subject: [BUG] (org-babel-result-to-file) adds the relative path even if attachment link is generated [9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)]
Date: Sun, 04 Dec 2022 00:54:22 +0100
User-agent: mu4e 1.8.11; emacs 30.0.50



Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See

    https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

With org 9.6 I am having an issue where the following generates a result with an attachment link that includes the original path to the file. I expect the link to be relative to the attachment directory.

* Test
:PROPERTIES:
:DIR:      build
:END:

#+begin_src R :results output file graphics :file build/test.png
 plot(1)
#+end_src

#+RESULTS:
[[attachment:build/test.png]]

The expected result is:

#+RESULTS:
[[attachment:test.png]]

My ob-core.el has in the org-babel-result-to-file function (on line 2712):

(file-relative-name result-file-name)

I changed it to:

(file-relative-name result-file-name attach-dir)

and got the expected result.


Johan

Emacs : GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.17.6)
of 2022-12-01
Package: Org mode version 9.6 (release_9.6-3-ga4d38e @ /usr/share/emacs/30.0.50/lisp/org/)
--
Johan



reply via email to

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