From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: compare-windows - synchronize points Date: 14 Aug 2003 17:43:18 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87r83oz4e1.fsf@mail.jurta.org> References: <87adagx8x8.fsf@mail.jurta.org> <87oeyuuuvz.fsf@mail.jurta.org> <87he4k4iz9.fsf@emacswiki.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1060872764 18046 80.91.224.253 (14 Aug 2003 14:52:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2003 14:52:44 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Aug 14 16:52:42 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 19nJT0-0001mM-00 for ; Thu, 14 Aug 2003 16:52:42 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19nJTb-0006pG-00 for ; Thu, 14 Aug 2003 16:53:19 +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 19nJRV-0005f2-8k for emacs-devel@quimby.gnus.org; Thu, 14 Aug 2003 10:51:09 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19nJQR-000596-SS for emacs-devel@gnu.org; Thu, 14 Aug 2003 10:50:03 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19nJP4-00025G-L2 for emacs-devel@gnu.org; Thu, 14 Aug 2003 10:49:09 -0400 Original-Received: from [64.246.52.22] (helo=ns5.tangramltd.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19nJOd-0000n7-9B for emacs-devel@gnu.org; Thu, 14 Aug 2003 10:48:11 -0400 Original-Received: from 80-235-42-85-dsl.mus.estpak.ee ([80.235.42.85] helo=mail.jurta.org) by ns5.tangramltd.com with esmtp (Exim 4.20) id 19nJOU-0001iI-Qh; Thu, 14 Aug 2003 17:48:03 +0300 Original-To: Alex Schroeder In-Reply-To: <87he4k4iz9.fsf@emacswiki.org> User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Original-Lines: 24 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns5.tangramltd.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jurta.org 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:15946 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15946 Alex Schroeder writes: > One good solution to this problem is to write interactive functions > for the most useful cases so that you can call them directly. There > need not be many of them: > > compare-windows-sync-word > compare-windows-sync-sentence > compare-windows-sync-defun > compare-windows-sync-regexp -- this one would query for a regexp Adding the interactive function for syncing seems to be a good thing. But what troubles me the most is the namespace wasting. Instead of creating n number of compare-windows-sync-* functions it's better to create one interactive function (e.g. compare-windows-sync-windows) which when called with argument C-u will ask the user for a function name (e.g. forward-word, forward-sentence) or a regexp (anyhow, one of your proposed functions asks for a regexp) and will set the buffer-local compare-windows-sync variable to this function or regexp. If the compare-windows-sync-windows is called without C-u, it could use the previously saved value of compare-windows-sync. -- http://www.jurta.org/emacs/