There is also SET RANGE to limit which lines are available. Op ma 10 jun. 2019 21:40 schreef Donald Russell <[email protected]>:
> See the XEDIT stage. > > Pipe ahelp xedit > > Use it to read starting at the current line, use subsequent stages to > select/do what you want. > > Don > > > > On Mon, Jun 10, 2019 at 12:35 Glenn Knickerbocker <[email protected]> > wrote: > > > Looking for an example of how to get a range of lines from XEDIT into a > > pipeline, I went to my macro that issues a pipeline from a file in XEDIT > > and was embarrassed to find this: > > > > 'COMMAND STACK' target > > Address COMMAND 'PIPE stack' etc. > > > > Apparently, I never got around to asking for a way to do this more > > directly, so that I can take action on individual lines while I'm at the > > right place in the file. If I know I'm not going to add or delete > > anything past the current line or change DISPLAY or SCOPE, I can use > > EXTRACT /NBSCOPE to compute a number of lines for TAKE: > > > > 'COMMAND EXTRACT /LINE/NBSCOPE' > > lines = nbscope.2 > > 'COMMAND LOCATE' target > > 'COMMAND EXTRACT /NBSCOPE' > > lines = nbscope.2 - lines > > 'COMMAND LOCATE :' line.1 > > Address COMMAND 'PIPE xedit | take' lines etc. > > > > That still leaves the problem of not having XEDITBACK baked in for when > > the target is above the current line. (In my current application, I > > actually don't care about the order of the lines, so I can just start > > from whichever end is the top.) > > > > I don't know if there's anything in XEDIT that Pipelines could grab onto > > to remember the position of the target line when lines are added or > > deleted (possibly including the target line) or DISPLAY and SCOPE > > change. If there is, it sure would be nice to have a stage that I could > > just ask for all the lines in the SCOPE up or down to the target. > > > > ¬R > > >
