[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add :noweb-prefix and :noweb-trans babel header arguments
From: |
Ihor Radchenko |
Subject: |
Re: [PATCH] Add :noweb-prefix and :noweb-trans babel header arguments |
Date: |
Tue, 31 May 2022 13:14:47 +0800 |
Sébastien Miquel <sebastien.miquel@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