From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 From: "James A. Robinson" Date: Wed, 28 Aug 2013 23:47:46 -0700 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=047d7bb04bc238c1a104e5107e40 Subject: [9fans] 9p write event to Acme? Topicbox-Message-UUID: 773bd992-ead8-11e9-9d60-3106f5b1d025 --047d7bb04bc238c1a104e5107e40 Content-Type: text/plain; charset=UTF-8 [argh, I posted this to the google group though I know that it won't show up...] Folks, I'm interested in writing some Acme commands to simulate execution of certain built-in commands. For example, I would like to be able to simulate the user 2-1 chording on an Edit command in the tag. Is my understanding correct if I am thinking that this would consist of a single event c0: M c1: x flag ^= 8 nb: 4 nr: 4 text: Edit arg: ... where ... represents the argument passed to Edit? Or would this consist of two events, with text set to Edit and then to the command to pass in? It's not clear to me if I also have muck with q0, q1, oq0, oq1 or loc. I was guessing that only people reading an event would be interested in those. I looked around to see if I could find examples of programs sending events to acme via 9p, but I haven't managed to find them. I see several examples of scripts calling something named winwriteevent, and the man page for that sounds promising, but I don't see it as part of plan9port, and I was guessing that people might use 9p write to acme/$winid/event instead, or write Go/C program using the acme api libraries that Russ provided? Jim --047d7bb04bc238c1a104e5107e40 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
[argh, I posted this to the google group though I know tha= t it won't show up...]

Folks,

I'm interested in writing some Acme commands to simulate
execution of certain built-in commands. =C2=A0For example, I would
like to be able to simulate the user 2-1 chording on an Edit
co= mmand in the tag.

Is my understanding correct if I= am thinking that this would
consist of a single event

c0: M
c1:= x
flag ^=3D 8
nb: 4
nr: 4
text: Ed= it
arg: ...

where ... represents the arg= ument passed to Edit?
Or would this consist of two events, with text set
to Edit a= nd then to the command to pass in?

It's not cl= ear to me if I also have muck with q0, q1,
oq0, oq1 or loc. =C2= =A0I was guessing that only people
reading an event would be interested in those.

I looked around to see if I could find examples of
programs sen= ding events to acme via 9p, but I haven't
managed to find the= m. =C2=A0I see several examples of
scripts calling something named winwriteevent, and
the man p= age for that sounds promising, but I don't
see it as part of = plan9port, and I was guessing that
people might use 9p write to a= cme/$winid/event
instead, or write Go/C program using the acme api
libraries = that Russ provided?

Jim

--047d7bb04bc238c1a104e5107e40--