prin1-to-string is actually universal in a way, since any otherprin1-to-string is too specific and only solves a single use-case.
Indeed. Originally I had thought of adding a new syntax <<"nw">> toConsider the following example: #+BEGIN_SRC emacs-lisp :noweb yes :tangle yes :noweb-prefix no :noweb-trans prin1-to-string <<preamble>> (setq latex-header <<nw>>) #+END_SRC There are two noweb references here. Setting source block-wide :noweb-trans is not helpful because the first reference will be incorrectly filtered through prin1-to-string.
You'd need to only allow a single function call with only oneI'd rather introduce a new syntax to transform the noweb reference inline. Something like #+BEGIN_SRC emacs-lisp :noweb yes :tangle yes :noweb-prefix no <<preamble>> (setq latex-header <<(prin1-to-string nw)>>) #+END_SRC
[...]This sounds a bit confusing. I would also add an example where it is useful to set :noweb-prefix to no.
I've added such an example in the revised
patch attached.
Thanks for the feedback.
Regards,
-- Sébastien Miquel