emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Get =#+RESULTS= without re-evaluating source code block?
@ 2021-01-27 22:14 doltes
  2021-01-27 22:38 ` tomas
  0 siblings, 1 reply; 7+ messages in thread
From: doltes @ 2021-01-27 22:14 UTC (permalink / raw)
  To: emacs-orgmode

Get =#+RESULTS= without re-evaluating source code block?

Let's suppose I have a code block which requires a long time to finish

#+NAME: big-computation
#+begin_src bash
sleep 5 # Some computation which requires a long time to complete.
echo a

#+RESULTS: big-computation

I want to use the results of that code block in other code blocks so I
use a =noweb= reference (see below.)

#+begin_src bash :noweb yes
printf "%s\n" <<big-computation()>>



However, doing this (i.e. using a =noweb= reference) would make the
command to be evaluated whenever getting its results. I don't want
this, I want the =:noweb= reference to actually use the already
computed results.

So, my question is: Is it possible to use the actual =#+RESULTS= code
block instead of always evaluating it when referencing the results
through a =:noweb= reference?


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-02-02 20:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 22:14 Get =#+RESULTS= without re-evaluating source code block? doltes
2021-01-27 22:38 ` tomas
2021-01-27 23:31   ` John Kitchin
2021-01-28  3:26     ` Greg Minshall
2021-02-02  2:10       ` John Kitchin
2021-02-02 20:02         ` Nick Dokos
2021-01-27 23:33   ` doltes

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