diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/fs.md | 59 | ||||
| -rw-r--r-- | docs/tags.md | 4 |
2 files changed, 39 insertions, 24 deletions
@@ -128,7 +128,9 @@ Existing Plan9port/v9fs clients need a userspace bridge for QUIC. /recent the files opened lately, closed ones too, most recent first, a line each: `open <path>` or `closed <path>` (read-only; `Recent` shows them in a pane, a look at a row reopening the file at its last dot; kept across sessions - in $XDG_STATE_HOME/pardes/recent, 200 files; acme has none, its dump and + in $XDG_STATE_HOME/pardes/recent, 200 files, the oldest closed one dropped + first, never an open one; only files on disk, not a name never saved nor + /virtual/; a name escaped as /index's is; acme has none, its dump and Load the nearest) /layout one line per column (16 at most; the board 6; Newcol past that fails, `no space for a column: 16 max`, ENOSPC), left to right: serial index x width current|notcurrent @@ -251,9 +253,13 @@ takes (`Verbose on`, `WindowOpacity 70`, `PanelSlide off`, `DumpDir <the directory in effect>`, `LocationsConfig ...`), so writing what it reads back changes nothing; a setting the frontend cannot show (`Lift`, `GripWidth` on a terminal) is refused as `Lift is GUI-only, invalid here` -(EINVAL: a request this build cannot take); a `Shell` or `Tty` naming no -shell says `no shell "x", not found` (ENOENT); a Dump into a `DumpDir` -that is not there says `Dump <path>: no such directory` (ENOENT); platform and startup facts are `/status`'s and the +(EINVAL: a request this build cannot take), and so is a builtin only the +GUI has (`Fonts`), written to an `exec` too, where it would otherwise run as +a shell command; a `Shell` or `Tty` naming no +shell says `no shell "x", not found` (ENOENT); a `DumpDir` whose last +directory is missing has it made at the Dump, and one further up missing +says `Dump <path>: no such directory` (ENOENT), one that is no directory +(`/dev/null`) `Dump <path>: /dev/null is not a directory`; platform and startup facts are `/status`'s and the Config window's, not settings. A pane's `ctl` takes the builtins that act on a pane (`Del`, or `Del k`/`Del j` to give its rows to the pane above or below, `Save f`, `Collapse`, which folds that pane, `Undo` and @@ -275,8 +281,9 @@ in Plan 9's words for a ctl (kernel/misc/parse.c:82-97), quoting the line: argument to a builtin that takes none, or none to one that needs it (`Msg`, `Mount`, `Find`, a setting's value but a switch's, which flips bare); `bad value in control message "X"` for a setting's value it does not take -(for `Theme`, naming the themes that share the name's first letter, since -all of them, `Themes`'s list, are too many for an error); +(for `Theme`, whose names are any case, naming every theme that shares +the name's first letter when they fit the 128 bytes a 9P error carries, +else the nearest few, since all of them, `Themes`'s list, are too many); and `not a session control message "X": write it to pane/<n>/ctl` or `not a window control message "X": write it to /ctl` for a word of the other ctl. 9ns maps them all to EINVAL, and a write refused here has done nothing. A line that then fails as it runs fails the @@ -728,9 +735,11 @@ missed its target cannot then write at the last one. The three flag files `dirty`, `mark` and `scroll` read `0` or `1` and take `0` or `1`: whether the buffer differs from its file, whether a write pushes an undo point (writing `1` pushes one now), and whether a write scrolls the -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. +pane. The writes of one open of `data`, `xdata` or `body` are one undo +step while `mark` is 1 (so `printf 'a\nb\n' > data` is one, though a +shell writes it a line at a time), and the next open starts another; to +make a loop's writes one step, write `1` (an undo point here), then `0`, +the writes, then `1` again. 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, a pane's @@ -740,13 +749,16 @@ 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, file or directory gone -- `look .` from a pane -whose directory is gone says `look: <dir>: no such directory` -- and for a +whose directory is gone says `look: <dir>: no such directory`, and a +`./zz.txt` or `../x` that is not there `look: ./zz.txt: no such file`, while a +plain `zz.txt` is looked for as text, a miss logged as any look's -- and for a Find or Grep that finds nothing, `grep: no match, not found`; Grep walks every pane's directory on this host, passing over panes of the served tree (`/virtual/`, a peer's `/n/<name>/`) and directories not there, so none of them spoils the rest; Find and Grep share one `+Search` a directory, each run replacing what the last showed, as acme reuses a -directory's `+Errors` (the exec reads that pane back), while a plain +directory's `+Errors` (the exec reads that pane back; one that finds +nothing empties it rather than leave the last rows), while a plain word's `LookWord list` search keeps a pane a pattern, 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 @@ -809,16 +821,12 @@ new log after its panes' `new`s (a relative Restore path is looked for in last dump this session wrote), then `restored <old> <new>` for each pane, mapping the serial it had to the one it has now, and `restoredcol <old> <new>` for each column, and `msg <serial|-> <text>` -for every line the editor says (with `verbose` on, that includes each -builtin announcing itself as it runs, on purpose: the log says which ran -- -unless the builtin then says something of its own that starts with its -name, `Kill: nothing running`, which takes the announcement's place; an -announcement is logged only for a builtin that succeeds: one that fails, -as it runs or when the host could not do its work (a Save's write, a -Dump's), leaves none, from a click at the keyboard too. A builtin that +for every line the editor says (a builtin announcing its own name as it +runs, with `Verbose` on, is the message row's alone, never logged: a `msg` +is something said, `Kill: nothing running`). A builtin that fails its write (`ctl`, `exec`, `/tagexec` or a column's `exec`, and an -open of `pane/new`) is logged by that write's `err` alone, no announcement -and no `msg`, so the same failure again is the same record again; a line said again word for word is counted, `msg 3 Undo: nothing to +open of `pane/new`) is logged by that write's `err` alone, no `msg`, so +the same failure again is the same record again; a line said again word for word is counted, `msg 3 Undo: nothing to undo (x40)`, as `err` is (below); a text past 256 bytes is cut there, between words, and ends in an ellipsis, `…`, as an `err`'s reason is past 200; its serial is the pane it ran at -- a line written to the root's @@ -951,9 +959,14 @@ INT|TERM|HUP|QUIT|KILL` and `exec`, which starts the pane's shell again in its directory: one that is gone is refused before anything runs, `exec: <dir>: no such directory` (ENOENT), and a shell the host cannot start (not there, not executable, a script whose interpreter is not there) fails the -write with why -- `shell: shell not found`, ENOENT -- keeping the -terminal; a `Tty` whose shell cannot start fails the same way and leaves -no pane. The host knows before it answers: the child reports a failed exec +write with why -- `shell: shell not found`, or `shell: interpreter +/no/such/interp not found` for a script whose `#!` names a program that is +not there, ENOENT -- keeping the terminal and its running shell: a shell +not there is refused before anything runs, and the host starts the new one +before the old goes, so one that cannot start leaves the old be; a `Tty` naming such a shell or +script is refused before anything runs (`Tty: interpreter ... not found`, +its `err` the only record), and one whose shell cannot start fails the +same way and leaves no pane. The host knows before it answers: the child reports a failed exec through a close-on-exec pipe. A directory removed under a running shell leaves the pane its name (never `... (deleted)`), so an `exec` works there once the directory is back. The size, and `pty/ctl`'s `winsize` read back, is diff --git a/docs/tags.md b/docs/tags.md index d79c64b5..c2d92b9a 100644 --- a/docs/tags.md +++ b/docs/tags.md @@ -78,7 +78,9 @@ sequence with a warning, pardes refuses the Edit. In `s`, `&` in the replacement is the matched text (`\&` a plain `&`); in `c`, `a` and `i` an `&` is only an `&`, as in sam. A pattern that finds nothing says so with the pattern (`no match for regexp /nomatch/`), and an `s` on an empty dot says -`no substitution: dot is empty`. +`no substitution: dot is empty`. A loop that finds nothing is no error, as +in sam: `Edit ,x/zzz/c/bar/` with no `zzz` changes nothing and succeeds, +silent, where `,s/zzz/bar/` says `no substitution`. `Undo` and `Redo` are acme's: typed or clicked in a pane's tag, or written to its `ctl`, they step the body back and forward through its edits, as the |
