From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 17 Jun 2009 19:09:28 -1000 From: Tim Newsham To: 9fans@9fans.net Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: [9fans] acme programming questions Topicbox-Message-UUID: 0c472d92-ead5-11e9-9d60-3106f5b1d025 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/