emacs-orgmode
[Top][All Lists]
Advanced

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

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


From: Ihor Radchenko
Subject: Re: [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: Wed, 07 Dec 2022 11:16:07 +0000

Johan Tolö <johan@toloe.se> writes:

> 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)

Thanks for reporting and catching the cause!
Fixed on bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cc5427b7e

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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