emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support for whitespace prefix for :noweb-prefix


From: Ihor Radchenko
Subject: Re: Support for whitespace prefix for :noweb-prefix
Date: Fri, 29 Mar 2024 09:43:36 +0000

Doerthous <doerthous@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>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]