9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] acme programming questions
@ 2009-06-18  5:09 Tim Newsham
  2009-06-18  6:49 ` Russ Cox
  2009-06-18  7:10 ` yy
  0 siblings, 2 replies; 4+ messages in thread
From: Tim Newsham @ 2009-06-18  5:09 UTC (permalink / raw)
  To: 9fans

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/



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-18 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-18  5:09 [9fans] acme programming questions Tim Newsham
2009-06-18  6:49 ` Russ Cox
2009-06-18  7:10 ` yy
2009-06-18 15:39   ` Tim Newsham

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).