emacs-devel
[Top][All Lists]
Advanced

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

Re: compare-windows - synchronize points


From: Juri Linkov
Subject: Re: compare-windows - synchronize points
Date: 15 Aug 2003 07:21:06 +0300
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Alex Schroeder <address@hidden> writes:
> Juri Linkov <address@hidden> 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/





reply via email to

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