From mboxrd@z Thu Jan 1 00:00:00 1970 From: dexen deVries To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Date: Thu, 9 Aug 2012 19:30:57 +0200 Message-ID: <2429125.iImseKnQP7@blitz> User-Agent: KMail/4.9 (Linux/3.5.0-l49; KDE/4.9.0; x86_64; ; ) In-Reply-To: References: <9025913.n3tMFBrZiE@coil> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [9fans] Acme: how to search only in selection Topicbox-Message-UUID: a97a740a-ead7-11e9-9d60-3106f5b1d025 On Thursday 09 of August 2012 08:47:26 Paul Lalonde wrote: > The real question is how to handle the next selection; tracking two > dots seems wrong. i believe Ruda's solution comes very close: pipe selected range to separate window (+Error, if you must) and then operate on it. However, it is not good enough: line numbers do not match original file. Is there a way to recover range of dot from script ran from Acme window? I couldn't find; expected the `acme/$winid/addr' file to contain char ranges of dot after `echo addr=dot | 9p write acme/$winid/ctl', but the `acme/$winid/addr' stays `0 0'. Using plan9port here. If there was a way to get $firstLine, $lastLine or $firstChar, $lastChar, it'd be easy enough to filter lines with sed or awk for match of both RegEx and line number or char range. Or to re-number lines as output by grep. -- dexen deVries 1972 - Dennis Ritchie invents a powerful gun that shoots both forward and backward simultaneously. Not satisfied with the number of deaths and permanent maimings from that invention he invents C and Unix.