all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: ediff refinement issues
Date: Tue, 30 Mar 2021 22:56:00 -0400	[thread overview]
Message-ID: <jwvk0poavsx.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: CAJcAo8s6DGhWLYyCV8O9nzBLqnU45ijq5zSQR6Tc-jmi1Ac6yw@mail.gmail.com

>>>      However, if the paragraphs are commented (for example,
>>>      with ;;; in elisp or # in shell), it highlights the ;;;
>>>      or the #.  it also sometimes highlights words as a side
>>>      effect.

FWIW, this is largely unavoidable.
Refilling has an effect similar to replacing

    foo bar ;; baz

with

    foo ;; bar baz

So the "fine" diff indicates that semi colons were removed at one place
and inserted at the other.  In order to "abstract away" semi-colons
which are placed at the beginning of all lines, it would take extra work
and neither ediff nor smerge does that.  I haven't thought about how
easy/hard it might be to implement such a thing (but at first glance,
I'd say it's probably not trivial).

As for why ediff sometimes highlights words and not smerge, I suspect
it's mostly an accident (linked to the details of how the fine-diffs are
defined in the two cases).  E.g. in the above example you could also say
that what happened is that "bar" was removed at one place and inserted
at another.  That's also valid, tho less good.  Maybe Ediff gets it
"less good" more often than Smerge because it doesn't have the
equivalent of `smerge-refine-weight-hack` which marks "move ;;" as less
costly than "move bar" in the above example?


        Stefan




  parent reply	other threads:[~2021-03-31  2:56 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 [this message]
2021-03-30 23:26     ` Michael Heerdegen
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=jwvk0poavsx.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --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.