|
From: | Davis Herring |
Subject: | Re: [PATCH] Showing the relevant part of a diff |
Date: | Fri, 15 Jul 2016 15:19:17 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 |
The "no FILE" case doesn't arise for single files, of course, unless there are no changes and the whole question is moot. For changeset diffs, I (soon will) handle an absent FILE by trying another buffer's file. It is already the case that the FILE-not-found case is a no-op in that point _remains_ at the beginning; this will make it truly ignorable, so there shouldn't be any confusion.
"soon" has finally arrived. There are now several "preparatory" patches. The first is just an update of the cleanup from before (February), but then there's (2) another to systematize support for normal diffs, (3) a single-word cosmetic change for multi-file diffs, (4) a refactor of `vc-parent-buffer' code, and (5) a documentation fix and simplification for `get-buffer-window' and friends.
The main (last) patch addresses the questions I asked and issues raised by Lars and Eli: it provides NEWS and manual text, supports normal-format diffs (as Lars said "would be nice"), and supports `vc-root-diff', `diff-backup', and `diff-buffer-with-file'. (I could easily support `diff' itself too; it does default to comparing to the current buffer's file, after all.) A buffer's point is used only if the buffer is visible, so as to not surprise the user by drawing attention to a part of a file that is no longer of concern.
It now has one code path for all diff formats, but it still assumes that hunk headers are accurate (is that a problem?), and it still has the behavior (I call it a feature) of showing you the place where a hunk describing a change at your current position would go if there were such a change.
Thoughts? Davis --This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.
0001-Clean-up-context-diff-header-regexps.patch
Description: Text Data
0002-Add-constants-for-normal-diff-headers.patch
Description: Text Data
0003-Use-checkout-rather-than-workfile.patch
Description: Text Data
0004-Snap-vc-parent-buffer-chains.patch
Description: Text Data
0005-Document-all-frames-argument-once.patch
Description: Text Data
0006-Set-point-in-diff-to-correspond-to-point-in-file.patch
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |