From c1990b3e6e196ad41379aa432bf3ccca8a65d9f0 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 20 Sep 2026 00:36:50 -0300 Subject: Flatten the 9P control tree and move it out of fs.zig The served tree loses the self/ level: /index /ctl /new /log /screen /listeners /pane//... /os, with /src only in -Dembed-sources=true builds (default off, on for esp32p4). ctl speaks the editor's own language with two lowercase verbs, look TEXT and exec TEXT, plus acme's addr verbs; the new/ factory directory becomes one clone file; cons is gone (exec Msg); name and sel are files; stats report real lengths, modes and mtimes; /log streams pane new/del/rename/save events. The tree code lives in src/ninep/ (tree, pane, ctl, addr, pty, events, screen, sources); fs.zig keeps host access, mounts, resolution and find/grep. Same engine and transports. README (fs-help.txt) and docs rewritten; tests updated and extended. Co-Authored-By: Claude Fable 5.1 --- src/tutor.txt | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/tutor.txt') diff --git a/src/tutor.txt b/src/tutor.txt index ae22ede9..394a48a3 100644 --- a/src/tutor.txt +++ b/src/tutor.txt @@ -387,29 +387,30 @@ typed pardes the 9P socket opens by default - A directory per pane holding `body`, `tag`, `ctl`, `addr`, `data`, - `event`, `pty/` and the rest, plus `index`, `cons` and `new/` at the - top under /self. Every pane shell receives `$PARDES_9P` (the socket) - and `$PARDES_PANE` (its serial). Use a 9P client to read and write: + A directory per pane holding `name`, `body`, `tag`, `ctl`, `addr`, + `data`, `sel`, `event`, `pty/` and the rest, plus `index`, `ctl`, + `new` and `log` at the root. Every pane shell receives `$PARDES_9P` + (the socket) and `$PARDES_PANE` (its serial). Use a 9P client: - /self/pane//body - /self/index - /self/new/ctl + /pane//body + /index + /new reading it makes a pane, answers its serial + /ctl `look FILE:12` and `exec Save`, as the mouse does A terminal pane also has `pty/`: - /self/pane/3/pty/ctl winsize, sig - /self/pane/3/pty/data terminal input/output + /pane/3/pty/ctl winsize, sig + /pane/3/pty/data terminal input/output Over 9P the same tree answers plan9port, from anywhere: 9p -a $XDG_RUNTIME_DIR/pardes-9p-work.sock ls / - 9p -a $XDG_RUNTIME_DIR/pardes-9p-work.sock read /self/index + 9p -a $XDG_RUNTIME_DIR/pardes-9p-work.sock read index ...and pardes is a 9P CLIENT too, so one session can read another's: pardes --mount=peer=work - /n/peer/self/pane/1/body Look opens the other session's body + /n/peer/pane/1/body Look opens the other session's body TWO THINGS WORTH KNOWING. While a program holds a pane's `event` file open, MIDDLE AND RIGHT CLICKS IN THAT PANE BELONG TO IT: pardes reports @@ -467,7 +468,7 @@ typed SPC is the leader (SPC ? lists every path) SCRIPTING 9P is served by default on $PARDES_9P - /self/pane//{body,tag,ctl,addr,data,event,pty/} + /pane//{name,body,tag,ctl,addr,data,sel,event,pty/} a script holding `event` owns that pane's middle and right clicks; writing a record back runs it -- cgit v1.3