[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Incremental search



** Reply to message from "Martin J. Osborne"  on
Wed, 25 Jun 2003 10:20:35 -0400


> As far as I can see, Emacs' "incremental search" isn't emulated by any
> command in xywwweb.u2. (Am I right?) Has anyone written an emulation
> of it?

People have come up with variants on "incremental searches" (though nobody, as
far as I can recall, called them that) since the beginning of XyWrite --
probably if you poked around in XySearch, you'd find four or five. Wasn't that
WordStar's way of searching? I never much liked the idea (it always struck me
as craven "isn't that cool" gimmickry), but I put a tiny one in my private part
of U2 which cobbles together several public routines, to do a fairly meticulous
job. To use it, formulate your search$ on the CMline, using any switches from
the native SE[A]rch command -- /F /T whatever -- but call it "ISE..." instead
of "SE...". When you've stated enough of the command (obviously, the command
itself (ISE[A][/switches]), plus some part of the \search_string\) and are
ready to execute it, hit the Helpkey, and keep adding chars until you get where
you're going. Escape to stop adding chars (to quit). Handles 1-, 2-, and
3-byte chars in the search $tring. You can edit the string, backspace, etc.
You could also make it pop a generic opening search template if you wanted,
like a command and some delimiters, and position the cursor between the
delimiters ready for more input; but I never bothered. What counts for me is
proper handling of three-byters, like tildes and so forth.

XPLeNCODE v2.0
b-gin [UNTITLED]
{{;5ise*}} Incremental SEarch (calls SE*) RJH 12/13/98[cr|lf
]{002}{<}SX27,{<}CP{>}{>}{<}SV28,{027}X{>}{<}LBA{>}{<}SX50,{<
}IS27{>}{>}[JM_]2.ReJuMP[Q2_][JM_]2.cmline[Q2_]{<}SV50,{>}{<}
XS616,28,01,,50{>}[JM_]2.PrsSG50[Q2_]{<}PREnter SEarch$... [E
scape quits]{>}{<}SX01,{<}RC{>}{>}{<}SX02,{<}VA$KC{>}{>}{<}IF
{<}PV02{>}>1{>}[GH_]{<}PV01{>}{<}GLA{>}{<}EI{>}{<}PRDone{>}{0
02}[cr|lf]
-nd
XPLeNCODE

Examples (absolutely identical to normal SE[A]rch command):

ise |hel|
isea/f |Ther|
isea/t Marti

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------