Let me make sure I understand the problem right: you have p9p
installed on two Unix boxes, A and B. Sitting at A, you ssh to B to
read your mail, and want to be able to plumb (or something
similar) attachments and have applications on A display them.
I presume you're also using non-p9p applications to view the
attachments.

If that's right, the problem is in two parts: having B feed
messages to the plumber on B, and having B find the files
referenced.

You can probably make the terminal mount the server; do so.
How doesn't matter: v9fs, fuse, nfs, afp, whatever. Just get it at,
say, /mnt/B. Make a plumbing rule that checks for files in
/mnt/B (after the normal check for files). You want
        arg isfile      /mnt/B/$1
or something very similar in that rule. Now when you plumb
/home/me/attachment1, after not finding that file locally
your plumber will look for /mnt/B/home/me/attachment1.
Have the 'plumb start' bit call open or OpenOffice or whatnot.

For the other part, rather than trying to figure out how to pass
messages around (which is easy if you can mount A from B:
just set $NAMESPACE to /mnt/A/whatever; but you likely
can't do that), just use the local plumber in the first place. For
example, 9term's "plumb" menu item (like plan9's rio) will
just feed things to a local plumber. If you've set the plumbing
rule up as described above, that's all you need.

(If you're using pine or something that 9term isn't up to, I'm
told there's an "rxvt-unicode extension for plumbing", but I
didn't know what "rxvt-unicode" was before being told that,
so I can't speak any more to it. ask in #plan9 on freenode.)

If, for whatever reason, you need to do something like
"!plumb" from mail (and can't mount A from B), things are
harder for you. A fake plumber to shuttle bytes to A is
probably doable, but it's likely a lot less work to figure out
how to use a local plumber instead.

Anthony


Reply via email to