9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Tim Newsham <newsham@lava.net>
To: 9fans@9fans.net
Subject: [9fans] acme programming questions
Date: Wed, 17 Jun 2009 19:09:28 -1000	[thread overview]
Message-ID: <Pine.BSI.4.64.0906171901460.14634@malasada.lava.net> (raw)

I've been trying my hand at some very simple acme programming
tasks and have some questions.  I'm interested in a utility
that translate dot into a filename:line-line range and a
utility that waits for an acme window to be closed.  If I'm
reinventing these, I'd love to hear about existing programs
that do these.

I wrote a small tool to translate dot into filename:address
and in the process noticed that its relatively easy to
get the dot positions in terms of characters, but I couldn't
find a good way to translate those into line numbers without
manually processing the input file and counting newlines.
Is there a better way to do this?  If I had a tool to do
the translation I could do the rest of the process in rc.
As it stands I ended up doing it all in C.
http://www.thenewsh.com/~newsham/x/9/aaddr
http://www.thenewsh.com/~newsham/x/9/acmeaddr.c

I wrote a small tool to wait for a window to be closed by
reading the event file and copying back all events that
had the ``1'' bit set in the flag.  This allows many of the
events to occur, but none of the search features work.  Can I
have acme's default search behavior by feeding back more
events to acme?
http://www.thenewsh.com/~newsham/x/9/acmewait.c

Tim Newsham
http://www.thenewsh.com/~newsham/



             reply	other threads:[~2009-06-18  5:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18  5:09 Tim Newsham [this message]
2009-06-18  6:49 ` Russ Cox
2009-06-18  7:10 ` yy
2009-06-18 15:39   ` Tim Newsham

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=Pine.BSI.4.64.0906171901460.14634@malasada.lava.net \
    --to=newsham@lava.net \
    --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).