emacs-devel
[Top][All Lists]
Advanced

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

Re: diff-mode misinterprets empty lines.


From: Stefan Monnier
Subject: Re: diff-mode misinterprets empty lines.
Date: Tue, 19 Feb 2008 11:32:05 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>>> In an effort to clear FOR-RELEASE, here is a simple-minded attempt to
>>> deal with this. It seems to fix the original problem at least.
>> 
>> It is problematic when you try to apply a hunk via C-c C-a because any
>> empty line following your hunk (e.g. the last hunk in a C-x v =) will be
>> taken as being part of the hunk and C-c C-a will think that the original
>> text was just missing a newline and will add it (as a result of its
>> fuzzy matching feature).

> Is there any progress on this issue, or is help needed?

No progress.  Help would be welcome.  I think it mostly involves trying
to use diff-sanity-checks (either the function itself or the ideas) at
more places.

E.g. diff-end-of-hunk should check that the place it found is consistent
with the hunk header's numbers and if not (and if looking at an empty
line) keep going further.

But be careful also that diff-end-of-hunk (and other functions) is/are
used in diff-fixup-modifs where the hunk header is presumed broken.

> It seems to me that this is the last bug remaining the FOR-RELEASE,
> although the release process is so opaque and confusing that I have
> little idea what's going on.

It was decided that this bug should not prevent the pretest.  I would
personally not hold the release for it either, so we already have
diff-sanity-checks which takes care of the most serious problems already.


        Stefan




reply via email to

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