[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tweaking magit/diff mode to be more helpful in text editing

From: Eric Abrahamsen
Subject: Re: Tweaking magit/diff mode to be more helpful in text editing
Date: Wed, 01 Jun 2016 13:08:37 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Yuri Khan <address@hidden> writes:

> On Wed, Jun 1, 2016 at 10:00 AM, Eric Abrahamsen
> <address@hidden> wrote:
>> <address@hidden> writes:
>> I just found wdiff[1]! This looks to be exactly what I want, and it's
>> got the right brand, too :) There's also something called adiff.
>> I've installed it, and tweaked my git config so that I can call "git
>> difftool --tool=wdiff" and see the diff using wdiff. Right now it spits
>> out the whole file, not just changes-plus-context, but presumably I can
>> figure out how to change that.
> Git also has a built-in wdiff-like mode. See git-diff(1) for
> --word-diff, --word-diff-regex and --color-words.
> --word-diff=porcelain might be especially useful for editor
> integration.

Well that's embarrassing. I was aware of --word-diff, but for some
reason was totally sure that it only provided "extra" word-level
context, but still marked refilled paragraphs as changes. Instead, it
seems to do exactly what wdiff does. My apologies for insufficient prior

It still doesn't work with Magit, but unsurprisingly the issue has
already been discovered and discussed[1]. The Magit developers have said
they won't support --word-diff, "not even read-only", because (as I
guessed) the resulting diffs can't be used as diffs are supposed to be
used: can't be applied, reverted, etc.

So I'll be able to send a fairly useful document to my author, but if I
want the benefit of --word-diff during editing, I'll need to write some
sort of parser myself.

Thanks for putting up with this inquiry!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]