emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* babel header argument :var is not expanded when tangling
@ 2017-12-24  3:16 numbchild
  2017-12-24 15:40 ` Grant Rettke
  0 siblings, 1 reply; 5+ messages in thread
From: numbchild @ 2017-12-24  3:16 UTC (permalink / raw)
  To: Org-mode

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

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/

[-- Attachment #2: Type: text/html, Size: 1378 bytes --]

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

end of thread, other threads:[~2017-12-28 13:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-24  3:16 babel header argument :var is not expanded when tangling numbchild
2017-12-24 15:40 ` Grant Rettke
2017-12-25 12:45   ` numbchild
2017-12-28  1:20     ` Grant Rettke
2017-12-28 13:43       ` [SOLVED] " stardiviner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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