GNU bug report logs - #17522
diff-mode frustrates attempt to correct corrupted diff file.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Sun, 18 May 2014 10:56:02 UTC

Severity: minor

Full log


Message #35 received at 17522 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 17522 <at> debbugs.gnu.org
Subject: Re: bug#17522: diff-mode frustrates attempt to correct corrupted diff
 file.
Date: Sun, 25 May 2014 16:18:09 -0400
>> diff-mode.el was partly changed to accommodate that looser format, but
>> not 100%.
> Why not?

The usual: lack of time/motivation/...

> If you're going to carry on making surreptitious changes to
> hunk headers, you'll need to determine the start and end of hunks
> reliably, especially corrupted hunks.  This can't be done with 100%
> certainty, and is going to involve heuristics.  A good way might be to
> scan a hunk _forwards_ counting lines before the first change to that
> hunk.

Exactly, with a before-change-function.

And if the hunk is found to be borked, then try to at least not make
things worse (and maybe suggest the use of diff-sanity-check-hunk, after
we make it into a command).


        Stefan




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

Previous Next


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