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: 15 Aug 2003 07:21:06 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87smo3wnyl.fsf@mail.jurta.org> References: <87adagx8x8.fsf@mail.jurta.org> <87oeyuuuvz.fsf@mail.jurta.org> <87he4k4iz9.fsf@emacswiki.org> <87r83oz4e1.fsf@mail.jurta.org> <873cg3lrjc.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 1060921915 30824 80.91.224.253 (15 Aug 2003 04:31:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 15 Aug 2003 04:31:55 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Aug 15 06:31:53 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 19nWFl-0006xQ-00 for ; Fri, 15 Aug 2003 06:31:53 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19nWGa-0006lT-00 for ; Fri, 15 Aug 2003 06:32: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 19nWD6-0006MI-QZ for emacs-devel@quimby.gnus.org; Fri, 15 Aug 2003 00:29:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19nWCt-0006LU-OT for emacs-devel@gnu.org; Fri, 15 Aug 2003 00:28:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19nWCM-00067Z-U5 for emacs-devel@gnu.org; Fri, 15 Aug 2003 00:28:54 -0400 Original-Received: from [64.246.52.22] (helo=ns5.tangramltd.com) by monty-python.gnu.org with esmtp (Exim 4.20) id 19nWCM-00067V-Kl for emacs-devel@gnu.org; Fri, 15 Aug 2003 00:28:22 -0400 Original-Received: from 80-235-33-151-dsl.mus.estpak.ee ([80.235.33.151] helo=mail.jurta.org) by ns5.tangramltd.com with esmtp (Exim 4.20) id 19nWCJ-0007XE-9p; Fri, 15 Aug 2003 07:28:20 +0300 Original-To: Alex Schroeder In-Reply-To: <873cg3lrjc.fsf@emacswiki.org> User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Original-Lines: 37 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:15965 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:15965 Alex Schroeder writes: > Juri Linkov writes: > > Adding the interactive function for syncing seems to be a good thing. > > But what troubles me the most is the namespace wasting. > > You think so? What will you save? It is just a few bytes in memory. > It is not unheard of, however. Note, for example, two different > functions for search-forward and re-search-forward. Now you can bind > both functions to a key, or use them in elisp easily. In either case, > you might have said, "Well, why not let the user answer a prompt and > decide whether he wants string or regexp search?" M-x is a nice user > interface because it gives you completion, and with one call, you have > answered all the questions. The two-step interface was reduced to a > one-step interface. You are right: adding more interactively callable commands simplifies the user's work. But is is useful only for the most frequently used functions. The functions search-forward and re-search-forward are good examples of very frequently used functions. On the other hand, the interactive commands compare-windows-sync-* would be used very rarely, if at all. Their only purpose would be to call corresponding forward function (forward-word, forward-line, forward-sentence, etc.) on two windows, which in itself has very limited applicability. Ideally, the command `compare-windows' should do all its work alone. If `compare-windows' is called on the matching points, then it should advance points until it finds next difference. If `compare-windows' is called on unmatched points then it should skip the difference and advance points until next matching positions and so on. I hope that patches I submitted allow to do it. You can try them in practice and tell if you need something more. -- http://www.jurta.org/emacs/