From: David Combs
Subject: (e)diff: how to better keep 'in synch'?
Date: 
Message-ID: <8mdpap$18v$1@slb6.atl.mindspring.net>
(Why Emacs in newsgrouop list?  
Because its ediff-cmd *uses* unix/gnu 'diff')
(Why lisp?  Because they use emacs)

It isn't exactly *rare* that diff gets out-of-sync;

I'm sure it's happened to all of us -- *especially*
when diffing two sibling-texts that "left home" some
time ago, and evolved separately.

By being "out-of-synch", I mean it pairs-up areas "incorrectly",
in the sense that some more-intelligent process, looking at
the two texts *in their entirety* -- *before* doing the
"pairing".


QUESTION-1: Are there some OTHER find-differences programs,
that analyze the two texts a bit more globally before
finding and pairing-up differences?

  (If one does exist, it's output could of course be
  post-processed to *look* like that of diff, so that
  eg ediff could use it *instead of* diff).


QUESTION-2: Once one sees that the pairing *is* faulty,
what adjustments would be worth-while to make *to* the
two texts?   

  (Perhaps by adding identical comments at strategically-placed
  locations; thus the next issue:

QUESTION-3: but then what rule(s)-of-thumb to use to *pick*
  these locations?) 



Thanks!

David

From: Kai Großjohann
Subject: Re: (e)diff: how to better keep 'in synch'?
Date: 
Message-ID: <vafem45bgyh.fsf@lucy.cs.uni-dortmund.de>
I think GNU diff has an option where it tries harder to find a smaller
set of differences.  Assuming that smaller means better, that could be
a choice.  The documentation also says that this might take longer,
though.

Does this help?
kai
-- 
I like BOTH kinds of music.
From: Toby Haynes
Subject: Re: (e)diff: how to better keep 'in synch'?
Date: 
Message-ID: <rip7l9xulxh.fsf@yukon.torolab.ibm.com>
!! "Kai" == Kai Gro�johann <···············@CS.Uni-Dortmund.DE> writes:

  Kai> I think GNU diff has an option where it tries harder to find a smaller
  Kai> set of differences.  Assuming that smaller means better, that could be a
  Kai> choice.  The documentation also says that this might take longer,
  Kai> though.

There are two options which I use when diff'ing files. The first, which Kai
mention is the '-d' option, which makes a better job of most problems. The
other one I tinker with is '-w' aka '--ignore-all-space' which sorts out the
most common problem I hit, which is indented {'s getting mistaken when I
reformat badly formatted code and getting totally out of sync. You can also add
-B which ignores blank line changes.

Cheers,
Toby Haynes

-- 

Toby Haynes
The views and opinions expressed in this message are my own, and do
not necessarily reflect those of IBM Canada.
From: Pete Forman
Subject: Re: (e)diff: how to better keep 'in synch'?
Date: 
Message-ID: <tud7jp5hu3.fsf@kryten.bedford.waii.com>
>>>>> "David" == David Combs <·······@netcom.com> writes:

    David> (Why Emacs in newsgrouop list?  
    David> Because its ediff-cmd *uses* unix/gnu 'diff')
    David> (Why lisp?  Because they use emacs)

    David> It isn't exactly *rare* that diff gets out-of-sync;

    David> I'm sure it's happened to all of us -- *especially* when
    David> diffing two sibling-texts that "left home" some time ago,
    David> and evolved separately.

    David> By being "out-of-synch", I mean it pairs-up areas
    David> "incorrectly", in the sense that some more-intelligent
    David> process, looking at the two texts *in their entirety* --
    David> *before* doing the "pairing".

This answer does not really address your question but may be of use.

In emacs the two files can be opened and narrowed to avoid a part that
is too different.  Then run ediff-buffers.
-- 
Pete Forman                 -./\.- Disclaimer: This post is originated
Western Geophysical           -./\.-  by myself and does not represent
···········@westgeo.com         -./\.-  the opinion of Baker Hughes or
http://www.crosswinds.net/~petef  -./\.-  its divisions.
From: Nils Goesche
Subject: Re: (e)diff: how to better keep 'in synch'?
Date: 
Message-ID: <lklmyd6y8c.fsf@pc022.xcs.local>
·······@netcom.com (David Combs) writes:

> It isn't exactly *rare* that diff gets out-of-sync;
> 
> I'm sure it's happened to all of us -- *especially*
> when diffing two sibling-texts that "left home" some
> time ago, and evolved separately.
> 
> By being "out-of-synch", I mean it pairs-up areas "incorrectly",
> in the sense that some more-intelligent process, looking at
> the two texts *in their entirety* -- *before* doing the
> "pairing".

You might try this first:

(setq ediff-diff-options "-d")
-- 
Nils Goesche
"Don't ask for whom the <CTRL-G> tolls."