help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: ediff refinement issues


From: Michael Heerdegen
Subject: Re: ediff refinement issues
Date: Wed, 31 Mar 2021 01:26:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

"Drew Adams" <drew.adams@oracle.com> 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 "`'?!:;\"{}[]()_-")

Michael.



reply via email to

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