emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: compare-windows trouble


From: Juri Linkov
Subject: Re: compare-windows trouble
Date: Thu, 25 Nov 2004 23:57:18 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Devon Sean McCullough <address@hidden> writes:
> It's still not smart enough to highlight both first lines as different
> and then skip over the identical rest of each paragraph, as it would
> do if the first para were in a different buffer with nothing after. *

It's because the granularity of differences is user preference defined
by `compare-windows-sync-string-size'.  A small number makes difference
regions fine-grained, a bigger number makes them more coarse-grained.

If you set `compare-windows-sync-string-size' to some value less than
the default (e.g. to 16) than it will do what you want in your case.

The reason why it highlights both first lines in the case when the
first para has nothing after it, is that `compare-windows' starts to
halve the value of `compare-windows-sync-string-size' automatically
in the end of the buffer when it fails to find more differences.

> PPS: I bet it would be easy for compare-windows to notice when you
> manually skip over a difference and then maybe duplicate your skip
> in the other window, e.g., compare-windows, eol, compare-windows
> might advance both sides to eol if it could guess what exactly
> you were aiming at.  Hmmm, C-u prefix is already kinda DWIM.

You can set `compare-windows-sync' to `end-of-line'.

> One of these days we'll have it learning to skip specified changes,
> e.g., a set of name changes.  This would naturally know about
> change logs and patches.

All this can be achieved by setting `compare-windows-sync' either to
a regular expression or a sync function.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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