From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: compare-windows - synchronize points Date: Mon, 25 Aug 2003 21:38:43 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87adagx8x8.fsf@mail.jurta.org> <87oeyuuuvz.fsf@mail.jurta.org> <87ptj8ajmx.fsf@mail.jurta.org> <87wudamyxb.fsf@mail.jurta.org> <87zni4dg94.fsf@mail.jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1061867565 21217 80.91.224.253 (26 Aug 2003 03:12:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Aug 2003 03:12:45 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Aug 26 05:12:44 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19rUGC-0003ZK-00 for ; Tue, 26 Aug 2003 05:12:44 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19rUM0-0007Vf-00 for ; Tue, 26 Aug 2003 05:18:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19rUFO-0004Hy-4y for emacs-devel@quimby.gnus.org; Mon, 25 Aug 2003 23:11:54 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19rSsR-00014E-VM for emacs-devel@gnu.org; Mon, 25 Aug 2003 21:44:07 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19rSqs-0008Qi-1s for emacs-devel@gnu.org; Mon, 25 Aug 2003 21:43:01 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19rSqR-0008Cr-TH for emacs-devel@gnu.org; Mon, 25 Aug 2003 21:42:03 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.20) id 19rSnD-0005lK-Aa; Mon, 25 Aug 2003 21:38:43 -0400 Original-To: Juri Linkov In-reply-to: <87zni4dg94.fsf@mail.jurta.org> (message from Juri Linkov on 20 Aug 2003 08:56:07 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:16153 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:16153 I forgot to mention that with small number it fails when an insertion contains the same substring which follows after an insertion. In this case it finds the closest substring (in inserted text) instead of original text unchanged in both files. I can see how that would happen. It suggests an idea to me. The idea is to search for a larger matching substring first, and then try smaller matching substrings. It's the same kind of idea as first trying smaller search ranges and then larger ones. Anoter idea: it could search first for an entire line (with a certain minimum length) of match between the two windows. After finding that, it could look within the mismatched areas for smaller partial matches. Want to try those approaches?