From c4ab29bce30f427decf3e199eebecfd415714a96 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 18:39:01 -0300 Subject: Edit runs sam's command language on a pane's body, as acme's Edit does, in one undo step Over 9P a rename everywhere was a loop of addr and data writes. Edit, from a tag, a pane ctl or exec, parses sam's commands as acme's edit.c does and runs them as ecmd.c does against the text as it was, collecting the changes in order as elog.c logs them and applying them at once: addresses (the addr file's, line:col included), x y g v c a i d s p = m t, u alone, and { }. One undo step; any error, in acme's words, changes nothing, fails a ctl write and is logged. p and = print to the directory's +Errors. Left out, and said: the file commands, the pipes, \1-\9 (mvzr keeps no submatches), and changes out of sequence, which acme applies with a warning. Co-Authored-By: Claude Opus 5.5 --- .agents/skills/pardes-9p/SKILL.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to '.agents') diff --git a/.agents/skills/pardes-9p/SKILL.md b/.agents/skills/pardes-9p/SKILL.md index 55df3091..757ce64a 100644 --- a/.agents/skills/pardes-9p/SKILL.md +++ b/.agents/skills/pardes-9p/SKILL.md @@ -150,6 +150,14 @@ then `\r`: sent line by line, a blank line ends a Python block, and Python For a file or scratch pane, with `pane=$m/pane/`: +Rename everywhere, or any sam edit, is one write: `echo 'Edit ,x/foo/c/bar/' +> $pane/ctl`. `Edit` takes sam's command language (acme's): addresses, `x y g +v c a i d s p = m t u` and `{ }` (commands in braces one to a line, so from +exec or a tag, not a one-line ctl write). Its changes are one undo step, and +one that fails changes nothing and fails the write with acme's words (`Edit: +no substitution`), logged as `err`. `p` and `=` print to the directory's +`+Errors`. Not there: `b B D e r w f X Y`, `< | >`, and `\1`-`\9` in `s`. + | Operation | Shell | Python client | |---|---|---| | Read text | `cat $pane/body` | `client.read(pane + '/body')` | -- cgit v1.3