GNU bug report logs - #15303
24.3; [diff-mode] diff-hunk-kill doesn't update numbers in subsequent hunks

Previous Next

Package: emacs;

Reported by: mcepl <at> redhat.com (Matěj Cepl)

Date: Sat, 7 Sep 2013 22:06:02 UTC

Severity: wishlist

Found in version 24.3

Full log


View this message in rfc822 format

From: Matěj Cepl <mcepl <at> redhat.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 15303 <at> debbugs.gnu.org
Subject: bug#15303: 24.3; [diff-mode] diff-hunk-kill doesn't update numbers in subsequent hunks
Date: Mon, 09 Sep 2013 20:26:06 +0200
[Message part 1 (text/plain, inline)]
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: mcepl <at> ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC

Our lives are spectacles of powerlessness.
    -- Richard Rohr

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 11 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.