Ihor Radchenko writes:
> Amy Grinn writes:
>
>> Here is a simple way to implement this feature.
>
> Since you are adding a new feature, it should have (1) test coverage;
> (2) be documented in the manual; (3) be announced in etc/ORG-NEWS.
Thank you for the tips, will do!
Amy Grinn writes:
> I kinda disagree with your reasoning but I agree with your conclusion.
> I think it would be strange for third party or user configuration to
> parse the value of a noweb header argument directly. Org provides a
> lublic api for this which should be backwards compatible:
>
>
Ihor Radchenko writes:
> :noweb yes <<< >>> is actually backwards-incompatible. Consider
> third-party code that makes assumptions about possible values of
> :noweb
> header argument. If third-party code does a check like
> (equal noweb-value "yes"), the new syntax can break such code.
I kinda
Amy Grinn writes:
> Here is a simple way to implement this feature.
> ...
> -(defun org-babel-noweb-wrap ( regexp)
> +(defun org-babel-noweb-wrap ( regexp info)
>"Return regexp matching a Noweb reference.
>
> Match any reference, or only those matching REGEXP, if non-nil.
>
> When
Amy Grinn writes:
> To expand on this, some major modes can fundamentally conflict with the
> default noweb syntax. Here is a valid shell script *and* a valid noweb
> reference to a block named EOF:
>
> cat <> file.txt
> Hello
> EOF
>
> I hope this helps explain why the wrap-start and wrap-end
Amy Grinn writes:
>> Org mode does not _currently_ modify the code. But that's actually wrong
>> - things like escaped ,* or indentation sometimes also stay on the way
>> and produce incorrect fontification. So, rewriting the fontification of
>> src blocks to cleanup the code before
Amy Grinn writes:
> Ihor Radchenko writes:
>
>> Amy Grinn writes:
>>
>>> I would like to add support for setting 'org-babel-noweb-wrap-start and
>>> 'org-babel-noweb-wrap-end for each src block individually
>>
>> May you please explain the use case when changing the default values
>> is
Ihor Radchenko writes:
> Amy Grinn writes:
>
>> How much does org mode modify the fontification for an indirect buffer?
>> Without having looked into it, I assume not much or at all.
>> ... I think
>> that approach could be more complex, especially when dealing with a
>> theoretically infinite
Amy Grinn writes:
>> This sounds like XY problem then.
>> If the real problem you want to solve is fontification, we may instead
>> adjust Org mode fontification of source blocks to exclude noweb
>> references.
>
> I see a problem with multiple possible solutions, some more involved
> than
Ihor Radchenko writes:
> Amy Grinn writes:
>
#+name: firewall
#+begin_src sh :noweb yes :noweb-start <<< :noweb-end >>>
>>>
>>> May you please explain the use case when changing the default values
>>> is useful?
>>
>> Of course! Changing the default values can be useful to prevent
Amy Grinn writes:
>>> #+name: firewall
>>> #+begin_src sh :noweb yes :noweb-start <<< :noweb-end >>>
>>
>> May you please explain the use case when changing the default values
>> is useful?
>
> Of course! Changing the default values can be useful to prevent syntax
> highlighting errors in a
Ihor Radchenko writes:
> Amy Grinn writes:
>
>> I would like to add support for setting 'org-babel-noweb-wrap-start and
>> 'org-babel-noweb-wrap-end for each src block individually using the
>> header args :noweb-start and :noweb-end:
>> ...
>> #+name: fi
Amy Grinn writes:
> I would like to add support for setting 'org-babel-noweb-wrap-start and
> 'org-babel-noweb-wrap-end for each src block individually using the
> header args :noweb-start and :noweb-end:
> ...
> #+name: firewall
> #+begin_src sh :noweb yes :noweb-start <&
Amy Grinn writes:
> I would like to add support for setting 'org-babel-noweb-wrap-start and
> 'org-babel-noweb-wrap-end for each src block individually using the
> header args :noweb-start and :noweb-end:
Here's another possible syntax we could use:
:noweb [wrap-start] [wrap-end
I would like to add support for setting 'org-babel-noweb-wrap-start and
'org-babel-noweb-wrap-end for each src block individually using the
header args :noweb-start and :noweb-end:
#+name: firewall-safe-mode
#+begin_src sh
echo "Firewall is now in safe mode."
#+end_src
#+name
15 matches
Mail list logo