Sébastien Miquel <sebastien.miq...@posteo.eu> writes:

>> #+name: documentation
>> This is a sample function documentation.
>> Because there are "quotes", it must be escaped and cannot be directly
>> used as noweb-reference.
>>
>> #+name: doc-escape
>> #+begin_src emacs-lisp :var str="" :tangle no
>> (prin1-to-string (string-trim-right str))
>> #+end_src
>>
>> #+begin_src emacs-lisp :tangle yes
>> (defun test ()
>> <<doc-escape(str=documentation)>>
>> t)
>> #+end_src
> I had converted my uses (tangling code, not text/documentation) to
> this but I ended up reverting.

Can you provide more concrete examples?

> Some drawbacks:
>   + doesn't work for all languages (does work for LaTeX)

Which languages do not work?

>   + the tangle gets very noisy: not only are the result of execution
>     printed in the echo buffer, but emacs visits the tangling buffer
>     and moves the point to each block.
>     Perhaps this is a bug that can be fixed.

Did you try to play with :results header argument to disable messages?
What exactly went unexpected?

>   + src block execution also resets the noweb cache, slowing down
>     tangle, though I have not tried to measure the effect.

I am not sure what you are referring to here. Can you elaborate?

Best,
Ihor


Reply via email to