|
From: | Sébastien Miquel |
Subject: | Re: [PATCH] Add :noweb-prefix and :noweb-trans babel header arguments |
Date: | Fri, 29 Apr 2022 14:27:09 +0000 |
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
0001-ob-core.el-Add-noweb-prefix-noweb-trans-babel-header.patch
Description: Text Data
0001-ob-core.el-noweb-prefix-header-argument-and-nw-synta.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |