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: Tue, 12 Aug 2003 19:22:20 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <87adagx8x8.fsf@mail.jurta.org> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1060731437 28358 80.91.224.253 (12 Aug 2003 23:37:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2003 23:37:17 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Aug 13 01:37:15 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 19mihX-0000Kq-00 for ; Wed, 13 Aug 2003 01:37:15 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19mipS-0005xy-00 for ; Wed, 13 Aug 2003 01:45:26 +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 19mieN-00088C-8y for emacs-devel@quimby.gnus.org; Tue, 12 Aug 2003 19:33:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19miXe-00028j-Ss for emacs-devel@gnu.org; Tue, 12 Aug 2003 19:27:02 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19miVC-0000U0-S0 for emacs-devel@gnu.org; Tue, 12 Aug 2003 19:25:02 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19miUg-0008O7-8q for emacs-devel@gnu.org; Tue, 12 Aug 2003 19:23:58 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.20) id 19miT6-0004CK-Oy; Tue, 12 Aug 2003 19:22:20 -0400 Original-To: Juri Linkov In-reply-to: <87adagx8x8.fsf@mail.jurta.org> (message from Juri Linkov on 11 Aug 2003 22:59:15 +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:15911 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15911 This patch allows to automatically synchronize points according to user-defined variable `compare-windows-sync'. If the value of this variable is a regexp, then the points in both windows are advanced to the next occurrence of this regexp. Doing this automatically would be a nice feature, but I wonder if that method really does the right job frequently. Could you tell us what kinds of text you have used the feature on, and what values you have used, and what sort of results you got? Reports from other people who try it would be useful too. Could we possibly find good defaults to put in, so that this feature can be available by default and won't need customization in order to work? Another idea I have for syncing up is that a program could use a simple quadratic algorithm to find the first matching 4-character string in the two buffers, and move there. This might get painfully slow when there are substantial insertions, though. The variable should be called compare-windows-sync-function, I think.