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 --- src/fs-help.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fs-help.txt') diff --git a/src/fs-help.txt b/src/fs-help.txt index 324b992e..2b42be1f 100644 --- a/src/fs-help.txt +++ b/src/fs-help.txt @@ -24,7 +24,7 @@ Below, $m is the mount: $NINE_MOUNT/pardes/; PARD printf 'text\n' >> $m/pane/$n/body append to a pane (> replaces it all) echo notes.txt > $m/pane/$n/name; echo Save > $m/pane/$n/ctl rename, then save it echo 'Msg hello' > $m/exec show text in the editor - echo '/^fn/' > $m/pane/$n/addr; printf NEW > $m/pane/$n/data replace what addr matched + echo 'Edit ,x/foo/c/bar/' > $m/pane/$n/ctl rename every foo, one undo step (sam's commands) cp $m/pane/$n/addr $m/pane/$n/dot; cat $m/pane/$n/sel select the range, read it exec 3<>$m/log; echo follow >&3; cat <&3 what happened lately, then wait for more cat $m/pane/$n/event hold it open to own that pane's clicks -- cgit v1.3