From 290584fc1127d017603c7c98c9aab27c0523a2cf Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 17:11:35 -0300 Subject: The README and the 9P skill warn that plan9port's 9p write always truncates, so it replaces a body acme ignores OTRUNC, pardes honours it, and 9p write sets it on every open: a pipe into body that appended under acme replaces the text here. The fix is >> through a mount. Co-Authored-By: Claude Opus 5.5 --- .agents/skills/pardes-9p/SKILL.md | 2 ++ README.md | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.agents/skills/pardes-9p/SKILL.md b/.agents/skills/pardes-9p/SKILL.md index eb5a26e1..94ad0de8 100644 --- a/.agents/skills/pardes-9p/SKILL.md +++ b/.agents/skills/pardes-9p/SKILL.md @@ -275,6 +275,8 @@ A `+New` scratch counts as unsaved (and holds up Exit, Restore, Del) only once it holds 100 bytes or more. A read of `data` or `xdata` moves `addr` past what it read, as in acme. Truncating `data` is pardes's own (acme ignores OTRUNC and always inserts). +plan9port's `9p write` always opens with OTRUNC, so `… | 9p write pane/body` +replaces the whole body: append with `>>` through a mount instead. | Read the selection | `cat $pane/dot` (offsets), `cat $pane/sel` (text) | the same two reads | | Select the addressed range | `cp $pane/addr $pane/dot` | `client.write(pane + '/dot', client.read(pane + '/addr'))` | | Reload from disk | `echo get > $pane/ctl` (refused once while there are unsaved edits; again discards) | `client.write(pane + '/ctl', b'get\n')` | diff --git a/README.md b/README.md index d7548e8c..f60b0ed7 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,10 @@ serves the layout: `/layout` lists the columns, their places and panes, and `/tag` and `/col//tag` are the workspace and column tags, editable like a window's ([the tree](docs/fs.md#the-served-tree)). +plan9port's `9p write` always opens with OTRUNC, so `echo x | 9p write +pardes//body` replaces the whole body where acme would append. To append, +write through a mount with `>>` (`echo x >> $PARDES_MOUNT//body`). + ## Requirements Zig **0.16.0** (`build.zig.zon` pins `minimum_zig_version`). Dependencies are -- cgit v1.3