Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!bbn!husc6!m2c!wpi!aej From: aej@wpi.wpi.edu (Allan E Johannesen) Newsgroups: comp.emacs Subject: Re: This is Bad (isearch-forward & query-replace) Message-ID: <3523@wpi.wpi.edu> Date: 13 Aug 89 18:07:25 GMT References: <1042@bimacs.BITNET> Organization: Worcester Polytechnic Institute, Worcester, Mass. Lines: 28 In-reply-to: sprecher@bimacs.BITNET's message of 13 Aug 89 13:17:51 GMT > The most annoying thing about emacs is that when you use incremental search > to find some string you must end it with an Escape. If you instead use an > arrow to move around the screen it generates junk (the reason is that the > arrow keys are implemented as a character sequence starting with an Escape, > e.g. ESC O C. Therefore, when you press an arrow emacs uses the ESC to end > the search and plugs in the OC charcters in the file, as if they were keyed > in from the key-board). This is really annoying. It happens so many times > that it's not funny. > Is there a way to replace the ESC with some other control-character as the > stop character for the search? .. many expressions of frustration are deleted above .. I never use the arrow pad since I like to keep my fingers over the keys, but do find that I often do want to issue meta-prefixed commands when I've positioned via search. So, if I had a terminal with a META key, I'd have no problem at all. Your problem, then is choosing the keystroke that you are least likely to want to issue when you've reached some point in a buffer via search; other commands will just dispatch and drop you out of search naturally. Personally, I like to exit search with a NUL, since I think that emacs' feature of dropping a mark where the search started is really where I would have put a mark anyway. I do have to stroke NUL NUL to drop a mark after search, but I manage to live with that. (setq search-exit-char ?\C-\@)