[Top][All Lists]

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

[PATCH] Showing the relevant part of a diff

From: Herring, Davis
Subject: [PATCH] Showing the relevant part of a diff
Date: Fri, 19 Feb 2016 05:43:23 +0000

When looking at changes made to a file, the ones most likely to be interesting 
are those affecting the portion of the file in view.  The second attached patch 
causes `vc-diff' to place point at the place in the diff that corresponds to 
point in the file being compared (only if the current source is the endpoint of 
the diff, of course).

The first patch (starting from a recent master) is preparatory and provides 
(and uses) a defconst for the main work.

To resolve:
1. Would this need a NEWS entry?
2. Does it need to be customizable?  (M-< is all it takes to "recover the old 
3. Is it worth supporting the (very rare) "normal" diff format?
4. Should M-x diff (or any other diff commands) behave similarly?
5. Do context/unified headers lack the (correct) length of the hunk often 
enough to bother with "donttrustheader"?  (This is the two FIXMEs in the patch.)


Attachment: 0001-Clean-up-context.patch
Description: 0001-Clean-up-context.patch

Attachment: 0002-Set-vc-diff-point.patch
Description: 0002-Set-vc-diff-point.patch

reply via email to

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