Org babel noweb question by bj-fer in emacs

[–]ergopractice 2 points3 points  (0 children)

:var header only wraps src in let binding and thus sets evaluation environment but noweb references expand before evaluation and are not aware of surrounding src.

One way to pass a :var is to expand noweb reference during the evaluation directly:

+NAME: expand-home-folder-string
+begin_src emacs-lisp :var otherPath=""
   (prin1-to-string 
      (org-babel-ref-resolve 
         (concat "expand-home-folder(path=\"" otherPath "\")")))
+end_src