all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: help-gnu-emacs@gnu.org
Subject: Re: Tweaking magit/diff mode to be more helpful in text editing
Date: Wed, 01 Jun 2016 13:08:37 +0800	[thread overview]
Message-ID: <8737oxh4x6.fsf@ericabrahamsen.net> (raw)
In-Reply-To: CAP_d_8UWK+ReVokYP47mDWsu5sEqzHkyYySo1av43+REwQz1HA@mail.gmail.com

Yuri Khan <yuri.v.khan@gmail.com> writes:

> On Wed, Jun 1, 2016 at 10:00 AM, Eric Abrahamsen
> <eric@ericabrahamsen.net> wrote:
>> <tomas@tuxteam.de> 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
Googling.

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!

E

[1]: https://github.com/magit/magit/issues/1615




      reply	other threads:[~2016-06-01  5:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31  6:49 Tweaking magit/diff mode to be more helpful in text editing Eric Abrahamsen
2016-05-31  7:48 ` Yuri Khan
2016-06-01  3:08   ` Eric Abrahamsen
2016-05-31  7:55 ` tomas
2016-06-01  4:00   ` Eric Abrahamsen
2016-06-01  4:17     ` Yuri Khan
2016-06-01  5:08       ` Eric Abrahamsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8737oxh4x6.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.