Doerthous <doerth...@gmail.com> writes: >> Do you mean that you want the code to be indented according to the major >> mode rules? >> > > Why it relates to major mode, > > Currently, with :noweb-prefix set to yes, the above code will be expand to > #+begin_src elisp > (let ((a 0) > (let ((b 1)) > `(,a ,b)) > #+end_src > > ~(let (~ is the prefix of <<varable-bindings>>. > > I thought we can replace just the prefix in current code[1] with > ~(setq prefix (replace-regexp-in-string "[^ \t]" " " prefix))~ ?
I see. So, you want a custom prefix before the expanded noweb reference lines. I think that a more general approach could be allowing :noweb-prefix to have a value of string that will be appended to each line on the expansion. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>