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

2017-12-27 Thread Grant Rettke
They work differently. Try this example: #+BEGIN_SRC emacs-lisp :var x="hi" (message x) #+END_SRC tangles to (let ((x (quote "hi"))) (message x)) but this #+NAME: x #+BEGIN_SRC emacs-lisp "hi" #+END_SRC #+BEGIN_SRC emacs-lisp (message «x») #+END_SRC tangles to this (message "hi" Sincerely

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

2017-12-25 Thread numbch...@gmail.com
I see. I will use noweb style for now. But should tangle expand :var variables when tangling? I think this is the correct behaviour. [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 C

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

2017-12-24 Thread Grant Rettke
> 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: > : H

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

2017-12-23 Thread numbch...@gmail.com
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 w