emacs-devel
[Top][All Lists]
Advanced

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

Re: diff-mode reports offsets incorrectly


From: Nick Roberts
Subject: Re: diff-mode reports offsets incorrectly
Date: Wed, 6 Feb 2008 10:03:33 +1300

 > > This didn't happen in Emacs 21.4, but happens in EMACS_22_BASE and trunk.
 > > I don't know about Emacs 22.1
 > 
 > Are you sure this changed?  

I tried it once and it appeared to be the case.  It's quite easy to test:

1) Visit a file under CVS control.
2) Remove a couple of lines in a couple of places and save it.
3) Do cvs-diff, C-x v =, and save the diff-buffer.
4) Revert the file, C-x v u.
5) Apply the hunks from the diff buffer but don't save them.

Hunks after the first report an offset.

6) If you have Emacs 21, just do 5)

No offsets are reported.

 >                            I can't remember changing anything in
 > this area.  Not that it's terribly important since hunk can be applied
 > in any order (and don't need to all be applied), so offsets are
 > a completely normal occurrence.

I agree that offsets aren't really important but they suggest to me that the
file to which the patch is being applied is a bit different to the one from
which it was created.  It just seems tidy to not report offsets in such
cases, in the same way that "patch <patchfile" doesn't.

-- 
Nick                                           http://www.inet.net.nz/~nickrob




reply via email to

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