diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 15:40:52 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 19:16:37 -0300 |
| commit | b48f79a1c19c4c96c30d29d5f8ac5ad19c8e3475 (patch) | |
| tree | 65a7620c2826bb03167c32e1df4681ed5c0b4f55 /docs/typ/reference.typ | |
| parent | cd712084c68b9e2bad350066a92a96ce78a9ff35 (diff) | |
| download | pardes-b48f79a1c19c4c96c30d29d5f8ac5ad19c8e3475.tar.gz pardes-b48f79a1c19c4c96c30d29d5f8ac5ad19c8e3475.zip | |
docs: the state file and the dumps as they are now: the reference's Dump and Restore paragraph (a label, `/dumps`, `Dump export <path>` to carry one, Restore of a label or a path, the words for a label the file keeps none of), its DumpDir row (the state file's directory, one that cannot be read kept aside), `/recent` kept in the state file, `/dumps` among the root files, the snapshots and the stats, and the log's `dump` and `restore` records; building.typ's Upgrade (`upgrade-<pid>` in the state file, the build before's `.dump` still read); setup.typ's new list of the files pardes keeps (the startup file and the crash record, the state file, the blob cache, the runtime directory's, and the build before's to delete); next-store.md's decision (everything on disk through xitdb, with the measured costs) over W4's, the closed panes under it and its tests as they are; and the changelog's entry, what a user must know: labels where dump files were, `Dump export`, `.dump` files read for one release, Recent read once from its old file, DumpDir now the state file's directory, the old cache directory no longer read, an unreadable state file kept aside
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'docs/typ/reference.typ')
| -rw-r--r-- | docs/typ/reference.typ | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index d0f492cf..cb2df2a8 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -160,7 +160,7 @@ the next read on that fid is EOF until the next write (or seek to 0). With other clients about, write and read on one open: #cmd("exec 3<>$m/pane/$n/look; echo x >&3; cat <&3; exec 3<&-") -*Snapshots.* #file("/index"), #file("/layout"), #file("/recent"), +*Snapshots.* #file("/index"), #file("/layout"), #file("/recent"), #file("/dumps"), #file("/commands"), #file("/status"), #file("/listeners"), #file("/sessions"), a read-only #file("ctl"), #file("/log"), #file("/screen") and a terminal's #file("body") freeze at the open, so one read in several chunks never @@ -192,7 +192,7 @@ the range and flag files, the workspace's #file("tag"), the root #file("look")/#file("exec") answers, #file("focus"); #file("event") and #file("pty/data") the next record's, zero when none waits. A stream and a view generated by each read stat 0, as acme's do: #file("log"), #file("screen"), #file("data"), #file("xdata"), #file("index"), -#file("layout"), #file("recent"), #file("listeners"), #file("sessions"), #file("pane/new"). +#file("layout"), #file("recent"), #file("dumps"), #file("listeners"), #file("sessions"), #file("pane/new"). Read those to the end rather than trust a length (`cat` does). The qid version of #file("body"), #file("data") and #file("xdata") is the pane's revision, so a stat sees an edit land. Modes are 0644/0666, 0444 @@ -389,20 +389,30 @@ Writes take settings and session builtins (`scope = .session` in #word("Delcol") and a pane's `get` refuse the same way with their own word, except that #word("Delcol") opens no `+Unsaved` pane: it names the panes only in its `unsaved` records and its notice. -- #word("Dump") writes `pardes-<date>-<time>.dump` (UTC) in #word("DumpDir"), - logs `dump <path>`, and adds a #word("Restore") `<path>` word naming it to the - workspace tag (the last dump's, replacing an earlier one's). - #word("Restore") `[path]` replaces every pane (bare: the last dump this session - wrote). The #word("Restore") write is answered, then *every connection is hung +- #word("Dump") puts the session in the state file (`pardes.xitdb` in + #word("DumpDir"), below) under a label, `pardes-<date>-<time>` (UTC; + `-2` and on for another in the same second), logs `dump <label>`, and adds a + #word("Restore") `<label>` word naming it to the workspace tag (the last + dump's, replacing an earlier one's). The state file keeps the newest 32 + dumps, and a text unchanged since an earlier one once; #file("/dumps") + lists them. `Dump export <path>` writes the dump to a file of its own + instead (`~` the home directory; the tag's word then names the path), which + `-l <path>` and #word("Restore") `<path>` read: the way to carry a session to + another machine. + #word("Restore") `[label|path]` replaces every pane: the state file's dump of + that label, or the dump in that file (an old `.dump` file too, for this + release); bare, the last dump this session made, else the newest. The + #word("Restore") write is answered, then *every connection is hung up*: dial again, and restart a 9ns mount. The new log has a `new` per - pane, then `restore <path>`. Its panes and columns keep the serials they + pane, then `restore <label|path>`. Its panes and columns keep the serials they had when dumped; one made after takes a serial past every one the old session handed out. A dump keeps every pane's text and undo: a clean file changed on disk since comes back as it is now, an unsaved one with its own text, marked changed on disk, and its first #word("Save") asks before overwriting. A #word("Restore") of a file that is no dump fails - before anything is replaced (`not a pardes dump: it is cut short`), with - EIO: read the `err` record for why. A #word("ThemeFile") the dump names that fails to load changes + before anything is replaced (`not a pardes dump: it is cut short`), and one + of a label the state file keeps none of says `Restore: no dump labelled + <label>`, each with EIO: read the `err` record for why. A #word("ThemeFile") the dump names that fails to load changes nothing. - #word("Kill") `[word...]` (above), #word("Mount") `name dial`, #word("Unmount") `name`, #word("Theme") `x`. - `size C R` sizes a session no terminal or window is attached to (160x50 @@ -438,7 +448,7 @@ word clicked in a tag does. The same lines go in the startup file [#word("JumpScope") `file|all`], [`file`: #word("Back") and #word("Forward") keep to the focused pane's file, that pane's places first, then the file's in another pane, and go to another file only when the file has no place left that way; from a terminal or a pane with no file they step through every place; `all`: every place, in the order it was jumped to], [#word("TermImages") `real|petscii`], [`real`: a new terminal draws its program's kitty graphics (yazi's previews) as pixels where the shell can; #word("Petscii") flips one terminal; a tui under a terminal without kitty graphics draws them as glyph art either way], [#word("Shell") `<name or path>`], [`$SHELL` when it is executable, else `/bin/sh`: the shell the next terminal and command pane run; a bare name is searched for in the usual bin directories, not `$PATH`; bare #word("Shell"): `$SHELL` if it is executable, else `/bin/sh`], - [#word("DumpDir") `<dir>`], [`$XDG_DATA_HOME/pardes`, else `~/.local/share/pardes`: where #word("Dump") writes, an absolute or `~` path to a directory that may be written (made if missing); a relative one, or one under a directory that may not be written, is refused; bare returns to the default], + [#word("DumpDir") `<dir>`], [`$XDG_DATA_HOME/pardes`, else `~/.local/share/pardes`: the directory of the state file, `pardes.xitdb`, which keeps Recent and the dumps and which every session of the user shares (one that cannot be read as one is kept aside as `pardes.xitdb.broken` and a new one started); an absolute or `~` path to a directory that may be written (made if missing); a relative one, or one under a directory that may not be written, is refused; bare returns to the default], [#word("TreeContext")], [off: sticky declaration headers in a source pane (per pane, dumped)], [#word("TreeContextTagStyle")], [on: draw those headers in the tagline style], [#word("LocationsConfig") `...`], [the layout of #word("Grep"), search and language-server results (below)], @@ -890,7 +900,7 @@ just before the #word("Restore") are not lost. [`ask <serial> <what> <choices>`, `answer <serial> <choice|->`], [a pane asked, and was answered (`-`: taken back, or the pane closed)], [`changed <serial> [reloaded|deleted]`], [its file changed on disk (bare: under unsaved edits)], [`unsaved <serial> <name>`], [a pane an #word("Exit"), #word("Restore"), #word("Del") or #word("Delcol") refused over, before the `err`], - [`dump <path>`, `restore <path>`], [a #word("Dump") written; a #word("Restore"), after its panes' `new`s], + [`dump <label|path>`, `restore <label|path>`], [a #word("Dump") written (a label of the state file's, or the file `Dump export` named); a #word("Restore"), after its panes' `new`s], ) The serial is the pane the line ran at (the pane with the keyboard for the root's @@ -927,12 +937,17 @@ at 200, ending in `…`. Control characters become spaces. pane from the root). - #file("/recent"): up to 200 files, PDFs and images, most recent first, `open <path>` or `closed <path>` (open in this window or not), every - window's: kept in `$XDG_STATE_HOME/pardes/recent`, shared by every pardes - process, each reading what the others wrote when it is next read. + window's: kept in the state file (#word("DumpDir")'s `pardes.xitdb`), shared + by every pardes process, each reading what the others wrote when it is next + read. #word("Recent") lists them in a query pane (line 1 `Recent`, the rest narrowing them by a fuzzy match), an open one at its dot now and a closed one at its last (a PDF's is its page); a #word("Look") of a row reopens it there. +- #file("/dumps"): the dumps the state file keeps, a line each, the newest + first: `<label> <date> <size> <panes>`, the date UTC + (`2026-11-05T12:00:00Z`), the size the dump's bytes (its session and the + texts it keeps); #word("Restore") `<label>` brings one back. - #file("/status"): `pid`, `version`, `panes`. - #file("/pager"): write a directory, `~` expanded and resolved (an empty line is the session's; one not there is refused ENOENT, a relative one |
