summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/fs.md18
1 files changed, 13 insertions, 5 deletions
diff --git a/docs/fs.md b/docs/fs.md
index 335ee4e6..a0dd86fa 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -76,7 +76,8 @@ Existing Plan9port/v9fs clients need a userspace bridge for QUIC.
/status pid, version and pane count
/look write a line: a right click on it at the active pane; read: the serials it touched
/exec write a line: a middle click; read the same serials
-/log one line per editor event: new|del|rename|save <serial> <name>; reads park
+/log recent events, one a line: new|del|rename|save <serial> <name>, msg <serial|-> <text>;
+ write follow to that open to wait for more
/screen rendered screen JSON; frozen per open handle
/listeners the session's dial addresses
/pane/new open it to make a pane; the read answers that pane's serial
@@ -173,8 +174,9 @@ pane. Truncating `tag` clears the part of the tag you may edit.
Stats report real lengths for `index`, `status`, `look`, `exec`, `listeners`,
`name`, `body`, `tag`, `sel`, `ctl`, the range files and the flag files, and
-for `log`, `event` and `pty/data` the length of the record a read would
-answer, which is zero when nothing is waiting. Modes are 0644/0666 (0444 for
+for `event` and `pty/data` the length of the record a read would
+answer, which is zero when nothing is waiting; for `log`, the text an open
+would freeze now. Modes are 0644/0666 (0444 for
read-only files, 0222 for write-only); mtime is the pane's last edit or the
process start. The qid version of `body`, `data` and `xdata` is the pane's
revision, so a stat sees an edit land without reading the text; every other
@@ -182,8 +184,14 @@ file leaves it zero rather than promise a version it cannot keep. Directory
entries carry no sizes, and neither does `/screen`, which has no length until
an open renders its frame; stat the entry.
-`/log` records `new`, `del`, `rename` and `save` while at least one client
-holds it open; a read parks until a record arrives. `/screen` returns JSON with
+`/log` is one ring (64 KiB) that records whether or not anyone reads it:
+`new`, `del`, `rename` and `save <serial> <name>`, and `msg <serial|-> <text>`
+for every line the editor says, builtins announcing themselves included.
+Control characters in a record become spaces, so a record is one line. An
+open freezes the ring's text the way `/screen` freezes a frame: reads walk it
+and end. Writing `follow` to that same open makes reads past it park for the
+next record, one per read; a follower the ring outran reads `lost N` first.
+Closing the open is the only way back, as with rio's `consctl`. `/screen` returns JSON with
`cols`, `rows`, `cursor`, a `styles` table, and row-major `cells` of
`[grapheme, style_index]`. Each open freezes one frame until close. A
terminal `body` freezes its history on the first read of each open handle;