Showing revision 2

Comments on 2019-11-11 Diffing buffer fragments

> There is the little-known compare-windows command, which ... has a
> major drawback of not displaying any “report” ... sometimes I’d like
> to have something more “tangible” to look at

I hacked together a solution to that:

It simply runs compare-windows repeatedly until it runs out of
differences, and it keeps all of the highlighting along the way, so
you end up with a complete highlighted view of the differences.

This works really nicely for simple cases, but it’s very slow for
comparing buffers with large numbers of differences. I’m convinced
that an efficient diff-based solution could be derived from other code
already in Emacs; but failing that you may find the above command to
be quite useful.

– Anonymous 2019-11-12 02:39 UTC

Why not use `ediff-buffers`? That way you can avoid the temp files, just create a pair of temp buffers.

– Joost 2019-11-13 16:04 UTC