Subject: Re: bug#15303: 24.3; [diff-mode] diff-hunk-kill doesn't update numbers in subsequent hunks

From: Matěj Cepl <[email-masked]>
Date: Mon, 09 Sep 2013 20:26:06 +0200

On 09/09/2013 08:18 PM, Stefan Monnier wrote:
> I might accept a patch which fixes this issue, but doing it right
> (e.g. handle all the different kinds of hunks we support, disregard
> subsequent hunks that apply to other files, ...) might prove too complex
> for the benefit.

I am afraid, I have no clue about Lisp at all (SICP is still lying on my
bed table, but I am afraid it is used mostly as sleeping pills ;)). I
have come to this problem while writing my own module for vim
(http://gitorious.org/vim-diff_navigator/).

> The problem also is that this presumes a particular use case (you get
> a diff for file FOO, then you remove some of the hunks to extract
> a sub-diff that will apply to the same file).

While working with Fedora (and RHEL) packages I work a lot with patches,
and it is often much more easy to actually edit patches (which are of
course correct ones) than to apply all patches and regenerate patches.
And quilt doesn't help everytime completely.

And of course, we have --fuzz=0 everywhere in Fedora (and RHEL).

So, yes, I understand where you are coming from, but I have a bit
different use case.

> But there are other uses cases where the current behavior is "right".
> E.g. I mainly use M-k in .rej files after I applied the corresponding
> hunk by hand, in which case the subsequent hunks shouldn't be updated.
> Admittedly, for a .rej file, the exact line numbers are often not quite
> right, so it wouldn't make things worse to update subsequent hunks.

OTOH, my script in the worst case doesn't make things worse.

Best,

Matěj
-- 
http://www.ceplovi.cz/matej/, Jabber: [email-masked]
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC

Our lives are spectacles of powerlessness.
    -- Richard Rohr