summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 06:05:08 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit554181b73fd53b898841203066382e4287b83e89 (patch)
tree09447d6a6ee1f3cdb3f70fbb6f136fb90a289f08 /docs
parent81ec44ca3b103bdc755e9f5d73a270c05c88617b (diff)
downloadpardes-554181b73fd53b898841203066382e4287b83e89.tar.gz
pardes-554181b73fd53b898841203066382e4287b83e89.zip
One rule for failing builtins: the write fails, one err, no msg
A builtin that failed through a ctl failed the write and logged its err, but through look, exec, tagexec or a column's exec it only said so on the message row, logged as a msg, and the write succeeded. Now every click write runs its builtin as a ctl line does (ctl.captured): a failure fails the write, with its words (EINVAL for malformed input, else EIO or what the words name), logs one err and no msg or announcement. get's Modified and a look miss are shown but logged once, as their err. A control character's refusal names its reason, a failed click reads back nothing, and look never reads back a pane closed since. The special case for a cut-short Edit through exec goes (the rule covers it); fs.md's table of exceptions becomes the one rule, as does the skill. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/fs.md28
1 files changed, 15 insertions, 13 deletions
diff --git a/docs/fs.md b/docs/fs.md
index 0a7cee7d..07b380aa 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -410,8 +410,8 @@ only its pane's; a command they run starts in the session's directory,
where pardes started, not the focused pane's), and what the word says is logged as the session's,
`msg -`. Blank lines are skipped, and every other line
is checked before any of them runs, so a control character fails the whole
-write with EINVAL; a command that fails inside the editor is reported on the
-message row, not as a write error. Reading any of these files answers the
+write with EINVAL; a builtin that fails there fails the write as well
+(below: one rule). Reading any of these files answers the
serials of the panes the last command created, or, when it created none, the
pane a look focused or the pane an exec acted on (even one it closed), one
per line; a look that found text answers the pane the text is selected in,
@@ -631,17 +631,19 @@ pane. Every `data`, `xdata` or `body` write is an undo step of its own
while `mark` is 1; to make a loop's writes one step, write `1` (an undo
point here), then `0`, the writes, then `1` again.
-Which writes fail and which only say so:
-
-| file | a write fails (the errno, an `err` record) | said on the message row and logged as `msg`, the write succeeding |
-|---|---|---|
-| `ctl` (root, pane, column) | a malformed line, an unknown word, a builtin's failure, a refusal (Modified...) | what a builtin says when it works |
-| `look`, `exec`, `tagexec`, a column's `exec` | a control character, a line over 1024 bytes, no pane slot or room | a look that finds nothing, a command's own failure, a builtin's failure |
-| `addr`, `dot`, `limit` | an address that does not evaluate | -- |
-| `data`, `xdata` | no address (the last one failed) | -- |
-| `body`, `tag`, `name`, `sel`, the flag files | a bad value, a pane gone | -- |
-| `event` | a malformed record, a range past the text | what the action it runs says |
-| `pty/ctl`, `pty/data`, `pty/run` | a malformed verb, a size out of range, a pane that is no terminal | -- |
+One rule for what fails: a write fails whenever what it asked for fails,
+whether it came to a `ctl` (the root's, a pane's, a column's), `look`,
+`exec`, `tagexec` or a column's `exec`, or to any other file -- with an
+errno that fits, EINVAL for malformed input (an unknown word, a control
+character, a command line over 1024 bytes, a `size` or `winsize` out of
+range, a bad address or event record), else EIO or the errno the words
+name (ENOENT for a pane or file gone, ENOSPC for no room or slot, EBUSY
+for a held lock) -- and logs its reason exactly once, as `err <serial|->
+<file>: <why>`, with no `msg` for it. A builtin a click runs (Save, get's
+`Modified`, Tty with no room, Edit) is no exception. What is not a
+failure: a look that finds nothing answers nothing and logs one `err`
+(`look: no match for ...`), the write succeeding; and a command line run in
+a command pane ends in its own time, told by its `exit` record.
`tag` reads the whole tag as the pane shows it: the computed path or PDF
page (no mark for unsaved text: the grip shows that, and `dirty` says it),