emacs-orgmode
[Top][All Lists]
Advanced

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

Re: noweb-start and noweb-end header args


From: Amy Grinn
Subject: Re: noweb-start and noweb-end header args
Date: Wed, 06 Mar 2024 07:05:53 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:

> Amy Grinn <grinn.amy@gmail.com> 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 specific language.  In the example I gave, <<<
>> and >>> aren't recognized as the beginning of a heredoc in a shell
>> script the way <<firewall-safe-mode>> would be.
>
> 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 others.  The org-babel-noweb-wrap-* variables are already
customizeable and, in researching a solution to this problem, I have
found users who set these variables on a file or directory-local level
already.

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 number of major modes.

Both solutions could be implemented at the same time.  We could build on
the existing functionality of the wrap-end and wrap-start variables
while also looking at ways to modify the syntax highlighting without
user intervention.



reply via email to

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