Exploring Noweb Refs with Arguments

I’m studying Noweb Refs. Here is something helping me make sense of it. I asked about it on-list, too, with more details. I’m still playing with it.

I didn’t understand the relationship between :wrap and :results drawer; there seems to be some overlap in some cases.

Not sure why the first column has single quotes and the 3rd result has them escaped. When the table is output in org, the result is a record without double quotes and the other with them. That is different than I expected and probably reflects my lack of understanding of what Org-Babel is doing here.

#+begin_src emacs-lisp :tangle "test.el" :results value table code replace :noweb yes
(let ((a <<ucase("hEllO, yOU.")>>)
      (b <<ucase(emacs-lisp-data)>>))
  (list a
        (type-of a)
        (type-of b)))
#+BEGIN_SRC emacs-lisp
| ("\"HELLO, YOU.\"" string "\"\\\"\\\\\\\"HELLO, WORLD.\\\\\\\"\\\"\"" string) |
#+name: ucase
#+begin_src emacs-lisp :var x="WeAthEr" :results value scalar code replace
(upcase x)
#+RESULTS: ucase
#+BEGIN_SRC emacs-lisp
#+name: emacs-lisp-data
#+begin_src emacs-lisp :results value scalar code replace
"Hello, world."
#+RESULTS: emacs-lisp-data
#+BEGIN_SRC emacs-lisp
"\"Hello, world.\""

One thought on “Exploring Noweb Refs with Arguments”

Leave a Reply

Your email address will not be published. Required fields are marked *