emacs-orgmode
[Top][All Lists]
Advanced

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

How is the return value of `org-babel-execute:FOO` interpreted?


From: Kodi Arfer
Subject: How is the return value of `org-babel-execute:FOO` interpreted?
Date: Sat, 2 Oct 2021 12:43:39 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

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?

Here's my code in case it's helpful, but it isn't pretty: 
https://github.com/Kodiologist/Daylight/blob/37e38d216ffe41ad3537522c40ccf1cdb134bbbc/daylight.el#L430



reply via email to

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