Re: Suggestion for ediff

2006-09-20 Thread Stefan Monnier
 It'd probably be best to layer the diffs: first do a word-granularity diff
 and then do a char-granularity diff within words.

 That's my opinion too.

 But maybe that'd be too slow.

 This is why I was proposing just looking at the beginning and end of
 each word, which is two comparison if the words are actually
 different, and linear in the number of common chars otherwise.

I see what you meant, then.  Sorry for being a bit slow.  Now that I think
about it, it may be possible to make char-level diffs on words reasonably
fast, by running char-level diff only once (rather than once per word),
basically putting all the words-to-diff into two files, separated by
sufficiently large and unique text to make sure that diff won't get
out-of-sync.


Stefan


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Suggestion for ediff

2006-09-19 Thread Stefan Monnier
 It currently does word-granularity, and does it very well. Character
 granularity would probably be too much work compared to what it would
 provide.

Actually, smerge-mode (take a look at smerge-refine) does
character-granularity and it wasn't more work (quite the opposite,
actually).

It usually works great, but it turns out that character granularity
sometimes fails spectacularly (diff gets confused by some apparent
similarity somewhere and ends up getting completely out of sync).

It'd probably be best to layer the diffs: first do a word-granularity diff
and then do a char-granularity diff within words.  But maybe that'd be
too slow.


Stefan


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug


Re: Suggestion for ediff

2006-09-19 Thread Matthieu Moy
Stefan Monnier [EMAIL PROTECTED] writes:

 It'd probably be best to layer the diffs: first do a word-granularity diff
 and then do a char-granularity diff within words.

That's my opinion too.

 But maybe that'd be too slow.

This is why I was proposing just looking at the beginning and end of
each word, which is two comparison if the words are actually
different, and linear in the number of common chars otherwise.

-- 
Matthieu


___
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug