Re: ediff refinement issues

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: ediff refinement issues

Michael Heerdegen
"Drew Adams" <[hidden email]> writes:

> > There are variables ediff-word-1 ediff-word-2 ediff-word-3
> > ediff-word-4 that are supposed to customize this.  I tried
> > them in various ways and they didn't produce the results I
> > wanted.  How do you use those variables to do this?
> I've never played with that, and I don't know of any command or option
> that helps here, but maybe someone else can help.  Looking in the code
> a bit, I see this:
> 1. Those are defvars, not defcustoms.
> 2. They are buffer-local.
> So I tried this in each of two buffers that had only this, respectively:
> "2011-01-01" and "2011-01-02": `M-: (setq ediff-word-1 "[:word]")'.

Yes.  And I think one should better add the hyphen character back to one
of the other word class characters.

> Then, hitting `!' showed a refinement that distinguished "2011" from
> the rest.  I would have expected the "01" / "02" difference to be
> distinguished.

That can happen when diff or word counting is wrong.  As you said: these
variables are buffer local, and Ediff uses a separate buffer to
"wordify" for the fine diffs, and in that buffer the original bindings
of ediff-word-* are visible, so you get an inconsistency in the
definition of word classes.

In summary, this should work ok:

  ;; e-w-1 minus _ and -
  (setq-default ediff-word-1 "[:word:]")
  ;; e-w-3 plus _  and -
  (setq-default ediff-word-3 "`'?!:;\"{}[]()_-")