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