emacs-orgmode
[Top][All Lists]
Advanced

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

Import Reusable org-babel snippet using #+SETUPFILE


From: Salomon Turgman
Subject: Import Reusable org-babel snippet using #+SETUPFILE
Date: Tue, 9 Jun 2020 13:28:13 -0400

Hello all,

I have created what I hoped was a reusable org-babel snippet that looks like this:

#+NAME: simulation
#+HEADER: :var cap="DEFAULTCAPTION" :cache yes :eval no-export :var altimage="1_image.svg#img1"
#+BEGIN_SRC emacs-lisp :var divid="defid" :var num=1 :results html :exports results
(format
"cool string that uses parameters %s %s ..."
num cap divid altimage (capitalize divid) divid)
#+END_SRC

I will use this snippet with something like:

#+CALL: simulation(cap="bam", num=1, divid="bamid"...)

Now, if I include the definition in every org file that I want to use it, everything works well. However, if I include the definition in a central org file that I import using #+SETUPFILE, things break and I don't get the proper output in my html exports.

Is there a way that I can "import" that snippet without rewriting it in every file I need it?

Thanks in advance!

-s-



reply via email to

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