Re: [feature request] set change block size to 1 line



On 11 November 2013 02:14, Max Hutchinson <maxhutch gmail com> wrote:
Hello,

I'd like to be able to [optionally] set the change block length to a single
line.  I'm trying to use meld to work with edits of text in latex with one
sentence per line.  Unlike code, where edits on consecutive lines tend to
relate to one another, in text consecutive edits can be semantically
independent.

Apologies for the very late reply; I just lost this.

I can appreciate the problem, but I'm not sure what the solution would
look like.  As with most diff algorithms, in Meld 'modified' chunks
are just identified based on an insertion/deletion pair without any
actual similarity metric. While you *could* (probably) set the change
block size to one, you'd then get very poor results if you ever added
a line. For example, in the case e.g.,

a - a
_ - b
c - c'
d - d

we'd have to make an arbitrary decision about which line matched what,
and would probably end up telling you that c was a modified b and c'
was an insertion.

Anyway, feel free to file a bug. I suspect this would be a fairly
manageable change, but I'm not sure it's a thing that I'd expose in
Meld itself; to me this feels like a job for an extension.

I looked through the archives and found this thread:
https://mail.gnome.org/archives/meld-list/2011-February/msg00017.html
I think my request is a bit of a special case and thus avoids some of the
complication.  I've found that diffuse is able to do this, and will use it
in the interim, but the rest of meld is much nicer.

That thread is actually about doing splits rather than a totally
different aligning mode, and it's already in Meld 1.8, with some
fairly significant limitations.

cheers,
Kai


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