diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/fs.md | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -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), |
