🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.help
Article #188981

Re: isearch eating initial ESC generated by cursor keys

#188981
From: Richard Maine
Date: Sat, 25 May 1991 01:56
29 lines
1969 bytes
In previous discussion of isearch, people have said:

Brandon> There's a MUCH cleaner way:

Brandon> (setq search-exit-char ?\r)

Dion> This is definitely cleaner, but does not solve the problem jbw put
Dion> the fix in for, namely typing of arrow keys (containing and ESC)
Dion> while in an isearch.  By putting in your fix, when he types
Dion> an arrow key while in isearch, it will merely beep at him, it will
Dion> not terminate the search AND PERFORM MOVEMENT ALSO, which is
Dion> what he wants and what his fix solves.

Wrong.  I use the fix of setting the search exit char to \r and it
does indeed both terminate the search and perform movement also.
I just checked it to make absolutely sure that I wasn't misremembering.
It works.

Check the emacs manual for details, but as I recall isearch terminates
and executes the appropriate command for any control key that isn't one
of isearch's special keys.  If you reset the search-exit-char, then
this also applies to the ESC key.

>>>>> "Brandon" == <bsa@telotech.ai.mit.edu>
>>>>> "Dion" == Dion Hollenbeck <hollen@megatek.UUCP>
--
--
Richard Maine
maine@altair.dfrf.nasa.gov
Technical Details
Message-ID: <MAINE.91May24185631@altair.dfrf.nasa.gov>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!think.com!ames!skipper!altair!maine
References: <9105150902.AA18293@telotech.UUCP> <HOLLEN.91May17122258@orion.megatek.UUCP> <JBW.91May24190538@bigbird.bu.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103b8b,c6ad83f607946d0c
X-Google-Attributes: gid103b8b,public
X-Google-ArrivalTime: 1991-05-24 21:49:09 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!zaphod.mps.ohio-state.edu!think.com!ames!skipper!altair!maine
From: maine@altair.dfrf.nasa.gov (Richard Maine)
Newsgroups: gnu.emacs.help
Subject: Re: isearch eating initial ESC generated by cursor keys
Message-ID: <MAINE.91May24185631@altair.dfrf.nasa.gov>
Date: 25 May 91 01:56:31 GMT
References: <9105150902.AA18293@telotech.UUCP> <HOLLEN.91May17122258@orion.megatek.UUCP>
 <JBW.91May24190538@bigbird.bu.edu>
Sender: news@skipper.dfrf.nasa.gov
Followup-To: gnu.emacs.help
Organization: NASA Dryden, Edwards, Cal.
Lines: 29
In-reply-to: jbw@bigbird.bu.edu's message of 24 May 91 23:05:38 GMT