From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: Tweaking magit/diff mode to be more helpful in text editing Date: Wed, 01 Jun 2016 12:00:45 +0800 Message-ID: <87h9ddsglu.fsf@ericabrahamsen.net> References: <87shwyvi0w.fsf@ericabrahamsen.net> <20160531075538.GA25176@tuxteam.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1464753700 13141 80.91.229.3 (1 Jun 2016 04:01:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Jun 2016 04:01:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 01 06:01:31 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b7xLV-0006KD-Nl for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Jun 2016 06:01:29 +0200 Original-Received: from localhost ([::1]:39487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7xLU-0005ju-If for geh-help-gnu-emacs@m.gmane.org; Wed, 01 Jun 2016 00:01:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7xL5-0005jb-FH for help-gnu-emacs@gnu.org; Wed, 01 Jun 2016 00:01:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7xL1-0002dt-9D for help-gnu-emacs@gnu.org; Wed, 01 Jun 2016 00:01:02 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7xL1-0002dm-2S for help-gnu-emacs@gnu.org; Wed, 01 Jun 2016 00:00:59 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b7xKx-0005wo-U1 for help-gnu-emacs@gnu.org; Wed, 01 Jun 2016 06:00:56 +0200 Original-Received: from 111.197.167.74 ([111.197.167.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Jun 2016 06:00:55 +0200 Original-Received: from eric by 111.197.167.74 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Jun 2016 06:00:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 111.197.167.74 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:QwCCFY4MDWQ4Ev8pun1S+OZtTlc= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110157 Archived-At: writes: > On Tue, May 31, 2016 at 02:49:35PM +0800, Eric Abrahamsen wrote: > > [...] > >> What I'd really like is to find a way [...] of only showing the >> actual edits, not the filling [...] > > You mean a diff which works at whole paragraph level instead of > at line level, as if the whole paragraph were a big honkin' line? Yup, that's exactly it. I'm also just considering the dumb kludge of clobbering Magit's deffaces. That wouldn't solve any of the other issues, though. > The "word processors" seem to "see" texts in this way. With > Emacs we are in a somewhat schizophrenic spot. You might try > actually having one-line paragraphs and use visual-line mode > with word wrapping; be warned that many an Emacs algorithm > doesn't like extremely long lines (they work, but they let > you notice their distaste :-) I've tried visual-line-mode before, and didn't like it too much. 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. I suppose I might be able to fool with Magit so that it displays diffs using the wdiff difftool, but probably I should just write some sort of standalone mode for doing this display. But then I'd still want to write git integration, to diff against the index... Are any of the Magit developers here? How hard would it be to add wdiff display as a sort of paste-on command to Magit? Obviously the diffs themselves can't be fed to git in any useful way, but it would be great to just have a command that compares commits using wdiff... Progress! E [1] https://www.gnu.org/software/wdiff/