emacs-orgmode
[Top][All Lists]
Advanced

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

[O] babel header argument :var is not expanded when tangling


From: address@hidden
Subject: [O] babel header argument :var is not expanded when tangling
Date: Sun, 24 Dec 2017 11:16:39 +0800


Here is a quick test:
* Test tangle will auto expand and substitute :var

#+begin_src js :tangle kk.js
console.log("hello, world!");
#+end_src

#+begin_src js :var name="chris" :tangle require-kk.js
// require("kk.js");
console.log("Hi, ", name);
#+end_src

#+RESULTS:
: Hi,  chris

#+NAME: check whether tangle expand and substitute :var
#+begin_src shell
cat require-kk.js
#+end_src

#+RESULTS: check whether tangle expand and substitute :var
: var name="chris";
: console.log("Hi, ", name);

The upper result should be: ~console.log("Hi, ", "chris");~.
  

[stardiviner]           <Hack this world!>      GPG key ID: 47C32433
IRC(freeenode): stardiviner                     Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/

reply via email to

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