9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Leimbach <leimy2k@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] acme(4) and addr=dot
Date: Sat,  6 Mar 2010 07:13:31 -0800	[thread overview]
Message-ID: <3e1162e61003060713s1c9cc2c4i1b5e8d7deb9d335e@mail.gmail.com> (raw)
In-Reply-To: <b3b4f6f31003051937g6d3821cam7f078870390c128a@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]

I think you want to create some kind of redirected handle to the ctl file
first, then start a new block in rc.  I believe this is how network
programming in rc can be accomplished in Inferno as well.  Is this not
allowed in p9p?  I've honestly not used the 9p commands too often.

On Fri, Mar 5, 2010 at 7:37 PM, Micah Stetson <micah@stetsonnet.org> wrote:

> I think this may apply to all versions of acme, but I'm running into
> it on p9p.  First, acme(4) claims that a read on a window's addr file
> returns the current address as a pair of character offsets m and n, in
> '#m,#n' format or just '#m' if m and n are equal.  It looks like it
> really returns m and n as two space-padded integer values.
>
> But that's just a documentation bug.  What's really bothering me is
> that I can't seem to get the value of dot.  I've tried this:
>
> % echo -n 'addr=dot' | 9p write acme/70/ctl
> % 9p read acme/70/addr
>          0           0 %
>
> Window 70's dot is somewhere on line 16.  Thinking maybe the ctl file
> had to stay open, I tried this:
>
> % {echo 'addr=dot'; 9p read acme/70/addr >[1=2]} | 9p write acme/70/ctl
>          0           0 %
>
> No help.  Am I doing something wrong?
>
> Micah
>
>

[-- Attachment #2: Type: text/html, Size: 1615 bytes --]

  parent reply	other threads:[~2010-03-06 15:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-06  3:37 Micah Stetson
2010-03-06 13:11 ` roger peppe
2010-03-06 15:13 ` David Leimbach [this message]
2010-03-06 15:16   ` erik quanstrom
2010-03-06 16:21     ` David Leimbach
2010-03-06 16:48       ` erik quanstrom
2010-03-06 19:52         ` David Leimbach
2010-03-06 18:34   ` roger peppe
2010-03-06 18:41 ` Eoghan Sherry
2010-03-06 18:54   ` Micah Stetson
2010-03-06 18:55   ` ron minnich

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=3e1162e61003060713s1c9cc2c4i1b5e8d7deb9d335e@mail.gmail.com \
    --to=leimy2k@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).