[9fans] Using plot(1)

2016-11-26 Thread Chris McGee
Hi All,

I’m trying graph and plot out. I have some questions.

Is there a way to pipe the output of plot or do I need to pull that out of the 
screen/window buffer? Also, is there a way to plot on top of an existing image?

I tried making a simple plot routine to draw a red unit circle with x and y 
axes. The lines are drawing fine, but the circle is completely cut off except 
for a hint of the top-most and bottom-most edges. Here’s the routine that I’m 
using. Is there something obvious that I’m doing wrong?

o
ra -1.0 -1.0 1.0 1.0
e
co r
cf r
di 0.0 0.0 1.0
co k
li 0.0 -1.0 0.0 1.0
li -1.0 0.0 1.0 0.0
cl

Thanks,
Chris


Re: [9fans] Trouble finding current window directory in acme

2016-11-26 Thread Chris McGee
Thanks, that will work.

Chris

> On Nov 26, 2016, at 12:56 PM, Antons Suspans  wrote:
> 
> On Sat, Nov 26, 2016 at 12:41:21PM -0500, Chris McGee wrote:
>> How does one get the /dev/acme/acme directory to be present in a normal 
>> document window? Alternatively, is there a simple way to find the index of 
>> the current acme window so that I can use the /dev/acme/x directory?
> 
> Use /mnt/acme/$winid for that purpose. It's described in acme(1).
> 
> Hope this helps,
> Antons
> 




Re: [9fans] Trouble finding current window directory in acme

2016-11-26 Thread Antons Suspans
On Sat, Nov 26, 2016 at 12:41:21PM -0500, Chris McGee wrote:
> How does one get the /dev/acme/acme directory to be present in a normal 
> document window? Alternatively, is there a simple way to find the index of 
> the current acme window so that I can use the /dev/acme/x directory?

Use /mnt/acme/$winid for that purpose. It's described in acme(1).

Hope this helps,
Antons



[9fans] Trouble finding current window directory in acme

2016-11-26 Thread Chris McGee
Hi All,

I’m in the process of writing an interactive tutorial for plan9/acme. I’m 
hoping to demonstrate how to execute a command on a text file that uses the 
current selection as input.

According to the acme manual page there should be a /dev/acme/acme (or 
/mnt/acme/acme) directory that represents the current window within acme. There 
should be the usual body, ctl, addr, etc. files. On a regular document window 
I’m finding that the directory is empty. However, when I run an interactive 
“win” window the files are there for that window.

How does one get the /dev/acme/acme directory to be present in a normal 
document window? Alternatively, is there a simple way to find the index of the 
current acme window so that I can use the /dev/acme/x directory?

Thanks,
Chris