Explaining in one picture why structural diffs are important.
Both buffers contains a diff for the same change.
Explaining in one picture why structural diffs are important.
Both buffers contains a diff for the same change.
@abcdw Yes, #difftastic *can* produce a much nicer diff, but only in some cases like this. I have several diff aliases, because there isn't one to rule them all. My favorite is
git diff --word-diff=color --word-diff-regex='[^[:space:][:punct:]]+'
Not perfect as it swallows some non-text characters, but very compact, whereas difftastic is often very noisy for me.
@nobodyinperson Yeah, I was experimenting with difftastic on the last stream and it produce results of variable quality. Most of the problems caused by scheme grammar not able to parse guix and guile specific reader macros, but I guess there are non-guix specific cases, where difftastic can also be noiser than line diffs.
However, you can switch to "plain text" grammar to get usual diffs. But interface for that isn't convenient yet.
I made some notes on difftastic here:
https://git.sr.ht/~abcdw/rde/tree/bb208ad2/src/rde/features/difftastic.scm#L14
@wilfredh @nobodyinperson I didn't find an easy way to have difftastic in magit. The closest I found is emacs-delta and was curious about difftastic backend for it. And ended up in this issue:
https://github.com/dandavison/delta/issues/535
So the support for structural diff from different tools is kinda lacking at the moment.
I didn't dive deeper to get a better understanding, why there are so few integrations of difftastic in other tools.
@wilfredh @nobodyinperson Talking about particular diffs examples. I don't have any at hand, but I'll share, when I face it again.
Most of the problems are caused by scheme grammar, which can't parse most of the guix source code. So I need to make an updated grammar first and monkeypatch difftastic guix package to add it.
I also have plans for this grammar for Arei/Ares Guile IDE and scheme-ts-mode, so I'll definitely spend time on it. Still have a couple other projects in front of the queue.