9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: dexen deVries <dexen.devries@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Acme: how to search only in selection
Date: Thu,  9 Aug 2012 19:30:57 +0200	[thread overview]
Message-ID: <2429125.iImseKnQP7@blitz> (raw)
In-Reply-To: <CA+POUVjn1raNrDy6Pr1274HNkRjDiE5JdzUy4Td-Ys99CbGrZw@mail.gmail.com>

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.



  reply	other threads:[~2012-08-09 17:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-09 13:11 dexen deVries
2012-08-09 13:46 ` Rudolf Sykora
2012-08-09 14:00   ` dexen deVries
2012-08-09 15:28     ` Matthew Veety
2012-08-09 15:47       ` Paul Lalonde
2012-08-09 17:30         ` dexen deVries [this message]
2012-08-09 19:08           ` erik quanstrom
2012-08-09 19:27             ` Kurt H Maier
2012-08-09 20:00             ` dexen deVries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2429125.iImseKnQP7@blitz \
    --to=dexen.devries@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).