Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ukma!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!adb
From: adb@bu-cs.bu.edu (Adam Bryant)
Newsgroups: comp.emacs
Subject: Re: This is Bad (isearch-forward & query-replace)
Message-ID: <36392@bu-cs.BU.EDU>
Date: 13 Aug 89 23:46:23 GMT
References: <1042@bimacs.BITNET>
Sender: adb@bu-cs.BU.EDU
Organization: Boston University
Lines: 60
In-reply-to: sprecher@bimacs.BITNET's message of 13 Aug 89 13:17:51 GMT

In article <1042@bimacs.BITNET> sprecher@bimacs.BITNET (Sprecher yossy) writes:
+
+   The most annoying thing about emacs is that when you use incremental search
+   [description of exiting isearch with arrow keys]
+   Why can't emacs be like any other good editor where once you found the text,
+   you can move around without any preliminary steps, such as pressing ESC?

   I used to find the exiting of i-searchs in that way annoying as
well, but I have since gotten much more used to using the C-n, C-f, etc.
commands to move around, so that is not really a problem anymore.

   You can also just use the command 'search-forward' to search.
Better yet, I have written a number of emacs-lisp functions to
interface the search-forward and search-backword commands which allow
me to do repeated searches.

+   query-replace is even worse: once you get out of it with an ESC it is
+   impossible to resume.

   True, but a quick 'redo (C-x ESC)' with a RETURN will start up the
same query-replace again.  [Same for a lot of other commands... redo is
a very handy command]

+   Why doesn't emacs have any plain vanilla search and search-replace where you
+   can pause and then resume as in SPF (pardon the heresy).

   It does.  If the current functions are not quite what you want, you can
always write some code to use those functions the exact way that you want.
That is without a doubt the best part of Emacs, being able to totally
configure your environment the way that you want.  [Does vi have an
Emacs-mode?] 
+
+   Is there a way to replace the ESC with some other control-character as the
+   stop character for the search?

    Probably...

+   I found a partial answer for the search by adding the following:
+
+   (global-set-key "\C-f" "\C-s\C-s")

    You probably don't want to do that, since C-f is actually very
useful especially if you use a number of different terminals, and some
don't have well placed arrows keys. [if any].

+   Any better suggestions?

    I find the combination of 'search-forward' and 'redo' to work
rather well.  And the functions that I wrote:
    'find-string-{forward,backward}'
    'refind-string-{forward,backward}'
come in really handy when I have function keys to waste.  [I also
use the functions in sun.el(?) for repeated regular expression
searches.]

adam bryant
--
Adam Bryant                               ARPA:   adb@bu-cs.bu.edu
Conquer Hack'n'Slasher                    BITNET: adb@buenga
list: conquer-news-request@bu-cs.bu.edu   UUCP:   ...!harvard!bu-cs!adb