[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Inject value of macro into code using a variable
From: |
wlharvey4 |
Subject: |
[O] Inject value of macro into code using a variable |
Date: |
Tue, 15 Oct 2019 09:37:18 -0700 |
Is it possible to inject the value of a macro into code using a variable?
I set a macro called ‘version’ with a version number at the top of my .org
file. I would like to do something like this:
#+macro:version Version 0.2.5
#+name:code-name
#+begin_src js :tangle some-file.js :var ver={{{version}}} :exports both
:results output
const version = ver;
#+end_src
When this code is evaluated during export, there is an error:
org-babel-ref-resolve: Reference ‘{{{version}}}’ not found in this buffer
Regards,
Wesley
- [O] Inject value of macro into code using a variable,
wlharvey4 <=