On Friday, 29 Mar 2024 at 09:43, Ihor Radchenko wrote: > Doerthous <doerth...@gmail.com> writes: >> #+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.
Not only that; at the moment, the prefix is defined by the text that comes before the noweb reference and hence why the "(let (" is repeated on the second line in the code block above. So it's a combination of no prefix in such a case and the indentation according to major mode. For me, the latter is not an issue but the former is. (but not really an issue for me as I make sure I only have noweb references on lines where such a replacement will not cause any problems...) -- : Eric S Fraga, with org release_9.6.23-1314-g945046 in Emacs 30.0.50