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: Johan Tolö
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: Tue, 06 Dec 2022 08:11:15 +0100
User-agent: mu4e 1.8.11; emacs 30.0.50

Johan Tolö <johan@toloe.se> writes:
[snipped]
* 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.
[snipped]

Adding a elisp example that produces the same unwanted behaviour:

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

#+begin_src emacs-lisp :results value file
 "build/test.png"
#+end_src

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



--
Johan Tolö



reply via email to

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