Just wanted to ask what the plan is now? How and when will such a patch 
normally be added to org-mode?

Thanks
Tim

On 23 Feb 2026, at 21:01, Tim Hansinger wrote:

> Hello Rudy,
>
> here's the new patch which includes the change and the new test.
>
> Best
> Tim
>
> ---------------------------------------------------------------
>
> - lisp/ob-plantuml.el (org-babel-plantuml-make-body):
>
> Refactor org-babel-plantuml-make-body to properly parse and preserve
> content around PlantUML diagram blocks.
>
> Previously, the function would apply variable expansion to the entire
> body content and only check for @start keyword to decide whether to
> wrap with @startuml/@enduml tags.
>
> Changes:
>
> - Parse body into 4 components: pre-body, keyword-type (e.g., uml), 
> inner-body,
> and post-body
> - Only apply variable expansion to the inner-body, not the entire body
> - Require exact matching between @start<type> and @end<type> keywords
> (e.g., @startuml must pair with @enduml, not @endsalt)
> - If @start<type> exists but no matching @end<type> is found, treat
> the entire body as diagram content and wrap with default
> keywords (@startuml ... @enduml)
> - Preserve any content before the first @start keyword (pre-body) and
> after the last @end keyword (post-body) without modification
> (except trimming)
>
> This ensures variable substitution only affects the actual diagram
> content.
>
> Examples now supported:
>
> - Content before/after diagram blocks
> - Proper handling of mismatched start/end keyword pairs
>
> - testing/lisp/test-ob-plantuml.el
>
> (test-ob-plantuml/single-var-on-body-with-start-end-keywords-and-content-outside-the-keywords):
> Added an additional test for aboves use case (var definition on a BODY
> with pre-existing @startxxx ... @endxxx keywords and pre-body / post-body 
> content).
>
> On 16 Feb 2026, at 10:30, Rudolf Adamkovič wrote:
>
>> Tim Hansinger [email protected] writes:
>>
>>> Hello Rudy,
>>
>> Tim, hi!
>>
>>> sorry for the long time it took.
>>
>> Looks like everyone is busy this winter. Me too! :)
>>
>>> I haven't created a patch yet but thought I would just send the code
>>> [...] Main changes to your code are: [...]
>>
>> Great work! Love the use back-references. Smart!
>>
>>> I tested it thoroughly and couldn't find any issues with this code.
>>
>> I would be great to capture (at least) "the spirit" of the change in
>> `test-ob-plantuml.el' so we avoid future regressions.
>>
>>> Would appreciate your feedback but I believe it is quite clean.
>>
>> It looks great.
>>
>>> If you like we could of course move the whole (rx ...) part directly
>>> into the (_ (string-match regex body)) part so we don't define a
>>> variable regex... but other than that I wouldn't change much.
>>
>> Your call. As always, maintainability is the top priority.
>>
>> Rudy
>>
>> "It is no paradox to say that in our most theoretical moods we may be
>> nearest to our most practical applications."
>>
>> --- Alfred North Whitehead, 1861-1947
>>
>> Rudolf Adamkovič [email protected] [he/him]
>> http://adamkovic.org

Reply via email to