From: Ed Marsh
Hi Skipper,
I attempted to do something similar--wanting to locate paragraphs
that contained two different words, not next to each other. When it
seemed that none of the search functions could span lines, I took
the easy way out, and temporarily changed the paragraphs to lines.
In Tse 2.6 and 2.8 the maximum line length is 8176 characters. I
made a set of macros, assigned to various keystroke combinations
which all include the F11 key, so I can set the RightMargin variable
to a number of different values that I often use. One of these makes
the line length 8176, while others include 68, 72, 80, etc.
It is quite simple to re-wrap the desired paragraphs into single
lines, do the search, copy part or all of the line elsewhere if you
wish, then either re-wrap back to the previous setting, or to be
completely safe, quit the file without saving it.
FWIW: (1) those macros also set insert, indent, and such things
(2) you can make a copy, rather than work with your original file;
(3) even the 2032 max length in Tse 2.5 covers most paragraphs
I've seen; (4) I use this construct in the search macros:
proc AlsoFind()
repeat
if lFind(TARGET1,"icg") and lFind(TARGET2,"icg")
MarkLine() mXfer()
elseif lFind(TARGET2,"icg") and lFind(TARGET1,"icg")
MarkLine() mXfer()
else Down()
endif
until CurrLine() >= NumLines()
end
The "double" search allows you to find the two targets,
regardless of which occurs first.
Hope you find this helpful,
Ed
At 10:45 AM 05/08/1998 +500, you wrote:
>Hi Gang,
>
>Does anyone have a 2.5 macro that will allow one to search over
>spanning lines?
>
>Skipper
>
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|