emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Johan Tolö" <johan@toloe.se>
To: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <875yep2ec5.fsf@toloe.se> (raw)
In-Reply-To: <875yesnia6.fsf@toloe.se>

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	other threads:[~2022-12-06  7:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-03 23:54 [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/)] Johan Tolö
2022-12-06  7:11 ` Johan Tolö [this message]
2022-12-07 11:16 ` 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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875yep2ec5.fsf@toloe.se \
    --to=johan@toloe.se \
    --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 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).