emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Kodi Arfer <listu@arfer.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: How is the return value of `org-babel-execute:FOO` interpreted?
Date: Sun, 03 Oct 2021 17:38:10 +0800	[thread overview]
Message-ID: <87bl46e9dp.fsf@localhost> (raw)
In-Reply-To: <801012e5-9500-d5b8-b772-4a2df92f200e@arfer.net>

Kodi Arfer <listu@arfer.net> writes:

> I have an `org-babel-execute` function for the Hy programming language that seems to have partly broken when I upgraded Org (from 9.1.14 to 9.4.6). It has code to write a plot to a file when a `:file` argument is given to the code block. It returns `nil` in this case, and previously, Org would automatically insert a link to the file in the results block, as desired. Now, however, the `nil` is printed in the results block. So I guess have to edit the function to return a link instead, but I can't find documentation for how Org interprets the return value of an `org-babel-execute` function: as I vaguely recall, you have to use a certain cons structure to produce a table, another to produce a link, and so on. So the concrete question in this case is: what do I return to put a link in the document?

I just tested using ob-gnuplot and :file link is correctly inserted when
org-babel-execute:gnuplot returns nil.

Are you sure that you have :file parameter in the source block you tried
to execute?


  reply	other threads:[~2021-10-03  9:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-02 16:43 Kodi Arfer
2021-10-03  9:38 ` Ihor Radchenko [this message]
2021-10-03 12:03   ` Kodi Arfer
2021-10-03 12:20     ` Ihor Radchenko
2021-10-03 12:39       ` Ihor Radchenko
2021-10-03 12:49         ` Kodi Arfer
2021-10-03 13:09           ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2021-10-02 13:27 Kodi Arfer

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:

  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=87bl46e9dp.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=listu@arfer.net \
    --subject='Re: How is the return value of `org-babel-execute:FOO` interpreted?' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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


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