> On 25 Mar 2025, at 18:48, Pablo Rodriguez via ntg-context 
> <ntg-context@ntg.nl> wrote:
> 
> Is this a feasible approach? I don’t need the most efficient solution,
> just one that I can handle and that just works.

I think relying on diff's colouring and a 1000 line change window would work 
but is not robust as it might unexpectedly break - e.g. if you were to port to 
another machine or change your terminal settings then you might get different 
escape sequences for the colours.

An alternative might be to use 'wdiff' which does a word-based comparison 
instead of the line-based comparison of diff. It also allows you to insert your 
choice of marker string before and after each change, making it easy to insert 
Context markup.

There's a LaTeX example in section 2.2 on this page which puts deleted text in 
boxes, and new text in double boxes. It should be pretty simple to adapt.
<https://www.gnu.org/software/wdiff/manual/wdiff.html>

Regards,
—
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to