diff options
Diffstat (limited to 'docs/typ/scripting.typ')
| -rw-r--r-- | docs/typ/scripting.typ | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/typ/scripting.typ b/docs/typ/scripting.typ index 03496ee2..8cb03a8b 100644 --- a/docs/typ/scripting.typ +++ b/docs/typ/scripting.typ @@ -140,9 +140,12 @@ pardes the editor of every program run there. = Traps <traps> -- A refused write says only `Invalid argument` or `Input/output error`; the - reason is the `err` record in the log (`tail -1 $m/log`). Only writes - log: a refused open, truncation or `rmdir` has its errno alone. +- Check the write's own status first: a refused write says only `Invalid + argument` or `Input/output error`, and only then is the log's last `err` + record its reason: `echo Save > $p/ctl || tail -1 $m/log`. A write that + succeeds adds no record, so after a success the log's tail may still show + an older, unrelated `err`. Only writes log: a refused open, truncation or + `rmdir` has its errno alone. - #file("addr") belongs to the pane, not to you, and moves on: each `/re/` searches from the last address, a #file("data") write leaves it just past what it wrote, and a read moves it too. Write #file("addr") |
