When I run tests for my projects, failing tests produce output that looks something like this:
expected: "..."
but got: "..."
The "..."
are long lines that often only have small differences.
How can I quickly diff lines like this?
I've tired copying the lines to separate buffers and using ediff-buffers
, but that had a few downsides:
the diff is line-oriented in a way that works poorly for comparing two long lines
ediff
messes up my window configuration, so I either need to spawn a new frame or save my current configuration in a register—in practice, this disrupts my workflow a bitediff
uses a separate frame for its controls, which is awkward when I'm running Emacs as a full-screen application in macOSdoing this manually is pretty laborious
I could solve the last problem by wrapping this up into an Elisp function, but the other issues would remain. Is there some way to configure ediff
or use some other diff function that would work better for this usecase?