all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: ediff refinement issues
Date: Wed, 31 Mar 2021 01:26:51 +0200	[thread overview]
Message-ID: <87zgykjk90.fsf@web.de> (raw)
In-Reply-To: <37A77E4AAFA04D55AE5F755FDFB995F7@us.oracle.com> (Drew Adams's message of "Sat, 26 Nov 2011 09:51:00 -0800")

"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.



  parent reply	other threads:[~2021-03-30 23:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AcysXwOm6vNJt6yHT5KpcypPYeDckQAAVtPw>
2011-11-26 17:15 ` ediff refinement issues Samuel Wales
2011-11-26 17:51   ` Drew Adams
2011-11-26 18:20     ` Samuel Wales
2011-11-26 18:38       ` Drew Adams
2011-11-29 10:54         ` Thien-Thi Nguyen
2011-11-29 17:27           ` Samuel Wales
2011-12-06 14:16             ` Thien-Thi Nguyen
2021-03-29  4:46     ` Samuel Wales
2021-03-29  4:48       ` Samuel Wales
2021-03-29  5:27         ` Eli Zaretskii
2021-03-30 22:04           ` Samuel Wales
2021-03-31  2:56       ` Stefan Monnier
2021-03-30 23:26     ` Michael Heerdegen [this message]
2011-11-26 20:28   ` Peter Münster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zgykjk90.fsf@web.de \
    --to=michael_heerdegen@web.de \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.