
On 25 Mar 2025, at 18:48, Pablo Rodriguez via ntg-context
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