Ah, okay. Thank you.
--
: Eric S Fraga, with org release_9.6.23-1314-g945046 in Emacs 30.0.50
"Fraga, Eric" writes:
> 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
On Friday, 29 Mar 2024 at 09:43, Ihor Radchenko wrote:
> Doerthous writes:
>> #+begin_src elisp
>> (let ((a 0)
>> (let ((b 1))
>>`(,a ,b))
>> #+end_src
>>
>> ~(let (~ is the prefix of <>.
>>
>> I thought we can replace just the prefix in current code[1] with
>> ~(setq prefix
Thanks, I'll check it out.
Doerthous writes:
> I kind of understand what you mean: what I need is just the no
> option, after the expansion (maybe with the help of some
> after-expansion-hooks), indent the source block according to
> major-mode. Right?
>
> I will try to find some hooks after expansion and some APIs to
>
Ihor Radchenko writes:
> I still feel that what you are really looking for is major-mode-specific
> indentation, not a prefix. Because indentation may require tabs, not
> spaces. Or may interfere with programming language.
I kind of understand what you mean: what I need is just the no
option,
Doerthous writes:
> Ihor Radchenko writes:
>
>> 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.
>
> With the use case discussed before, is allowing :noweb-prefix to have a
> value of string
Ihor Radchenko writes:
> 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.
With the use case discussed before, is allowing :noweb-prefix to have a
value of string means I need to provide a
Doerthous 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))
>
Ihor Radchenko 于2024年3月29日周五 03:25写道:
>
> Doerthous writes:
>
> > Can we add a support for whitespace prefix such that the prefix of a
> > noweb-ref replaced by whitespace characters?
> >
> > ...
> > #+name: a-fragment
> > #+begin_src elisp :noweb yes :noweb-prefix whitespace
> > (let (<>)
> >
Doerthous writes:
> Can we add a support for whitespace prefix such that the prefix of a
> noweb-ref replaced by whitespace characters?
>
> ...
> #+name: a-fragment
> #+begin_src elisp :noweb yes :noweb-prefix whitespace
> (let (<>)
> <>)
> #+end_src
>
> using whitespace :noweb-prefix, the
Hi
Can we add a support for whitespace prefix such that the prefix of a
noweb-ref replaced by whitespace characters?
Here is a use case,
#+begin_src elisp :noweb-ref varable-bindings
(a 0)
(b 1)
#+end_src
#+begin_src elisp :noweb-ref do-something
`(,a ,b)
#+end_src
#+name: a-fragment
12 matches
Mail list logo