From 6decf23fe8ac1ce6b48dac42a3502900f6e251b7 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 7 Nov 2026 01:02:25 -0300 Subject: follow: `Follow` (SPC c f) is Emacs's follow-mode, one text across a chain of Zerox twins shown in column order as consecutive pages (File.followChain, which syncTwins runs only for a twin group holding a chain): a scroll of any page reflows the others from it, the keyboard's page leaves its inner edges to the cursor, which goes on into the next page rather than scrolling it, the chain's ends scroll it as one pane, `Unfollow` on a follower's tag (or Del) takes a pane out, and the chain is a twin's `follow` flag with each view's `follow_scroll`, so a dump, Restore and replicas carry it; test/behaviour/follow.zig and follow.snap pin it, the reference, guide, changelog and builtins-json say it, and the builtins, leader and ttyhelp goldens list SPC c f Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- docs/typ/builtins-gui.json | 2 ++ docs/typ/builtins-tui.json | 2 ++ docs/typ/guide.typ | 6 ++++++ docs/typ/reference.typ | 24 +++++++++++++++++++++++- 4 files changed, 33 insertions(+), 1 deletion(-) (limited to 'docs/typ') diff --git a/docs/typ/builtins-gui.json b/docs/typ/builtins-gui.json index 37b8e1ba..09517de3 100644 --- a/docs/typ/builtins-gui.json +++ b/docs/typ/builtins-gui.json @@ -37,6 +37,7 @@ {"name": "Exit", "leader": "SPC q", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Quit the editor, refusing once while a pane holds unsaved text: an Exit with nothing edited since discards it."}, {"name": "Filter", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Recolour a terminal's or a +Pager's program colours to the theme, or show them as sent, flipping between them."}, {"name": "Find", "leader": "SPC f f", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the files below this pane's directory whose names hold its argument, in a +Search."}, + {"name": "Follow", "leader": "SPC c f", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Emacs's follow-mode: one text across a chain of panes as consecutive pages, each going on where the one before ends, scrolled as one."}, {"name": "Font", "leader": null, "also": [], "arg": true, "scope": "root", "setting": true, "choices": null, "doc": "The body font, by name or path, and its size."}, {"name": "Fonts", "leader": "SPC t f", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "List the fonts in a pane, each a word to click."}, {"name": "Forward", "leader": "SPC j i", "also": ["C-i"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-i: one step forward again, up to wherever Back started."}, @@ -101,6 +102,7 @@ {"name": "Tutor", "leader": "SPC h t", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the tutor, a document to work through."}, {"name": "Unattach", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Unattach a pane from the pane it answers for: it stays where it is, a pane of its own, and the next search from that pane opens another under it."}, {"name": "Undo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Undo and Redo: step the pane's body back or forward through its edits, from a tag, a pane ctl or exec."}, + {"name": "Unfollow", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Take this pane out of its Follow chain: it stays, a Zerox twin with the scroll it has, and the chain closes up behind it."}, {"name": "Unmount", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Unmount the 9P tree mounted under /n/."}, {"name": "Up", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane above, and from a column's top pane to its tag."}, {"name": "Upgrade", "leader": "SPC s U", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Move this session onto the pardes installed since it started, in place: its text, undo, views, terminals with their running shells, and its terminals and windows come along."}, diff --git a/docs/typ/builtins-tui.json b/docs/typ/builtins-tui.json index e307b3f8..edc401f6 100644 --- a/docs/typ/builtins-tui.json +++ b/docs/typ/builtins-tui.json @@ -36,6 +36,7 @@ {"name": "Exit", "leader": "SPC q", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Quit the editor, refusing once while a pane holds unsaved text: an Exit with nothing edited since discards it."}, {"name": "Filter", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Recolour a terminal's or a +Pager's program colours to the theme, or show them as sent, flipping between them."}, {"name": "Find", "leader": "SPC f f", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "List the files below this pane's directory whose names hold its argument, in a +Search."}, + {"name": "Follow", "leader": "SPC c f", "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Emacs's follow-mode: one text across a chain of panes as consecutive pages, each going on where the one before ends, scrolled as one."}, {"name": "Forward", "leader": "SPC j i", "also": ["C-i"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Ctrl-i: one step forward again, up to wherever Back started."}, {"name": "Get", "leader": null, "also": [], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Get: the pane's file read again, its unsaved edits refused once as Del refuses them."}, {"name": "Grep", "leader": "SPC f g", "also": ["topbar"], "arg": true, "scope": "pane", "setting": false, "choices": null, "doc": "Find's sibling: Find matches file NAMES under this pane's directory, Grep matches the LINES of those files, on the disk engine's worker."}, @@ -95,6 +96,7 @@ {"name": "Tutor", "leader": "SPC h t", "also": ["topbar"], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Open the tutor, a document to work through."}, {"name": "Unattach", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Unattach a pane from the pane it answers for: it stays where it is, a pane of its own, and the next search from that pane opens another under it."}, {"name": "Undo", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "acme's Undo and Redo: step the pane's body back or forward through its edits, from a tag, a pane ctl or exec."}, + {"name": "Unfollow", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Take this pane out of its Follow chain: it stays, a Zerox twin with the scroll it has, and the chain closes up behind it."}, {"name": "Unmount", "leader": null, "also": [], "arg": true, "scope": "root", "setting": false, "choices": null, "doc": "Unmount the 9P tree mounted under /n/."}, {"name": "Up", "leader": null, "also": [], "arg": false, "scope": "pane", "setting": false, "choices": null, "doc": "Move the keyboard to the pane above, and from a column's top pane to its tag."}, {"name": "Upgrade", "leader": "SPC s U", "also": [], "arg": false, "scope": "root", "setting": false, "choices": null, "doc": "Move this session onto the pardes installed since it started, in place: its text, undo, views, terminals with their running shells, and its terminals and windows come along."}, diff --git a/docs/typ/guide.typ b/docs/typ/guide.typ index 2128f0cc..51f29fb8 100644 --- a/docs/typ/guide.typ +++ b/docs/typ/guide.typ @@ -146,6 +146,12 @@ To open beside: #word("Newcol"), then #word("Look") a file name typed in its tag opens it there; #key("Alt-c") moves a pane into a new column. #clip("columns", wide: true) +A file longer than its pane can go on in the next column, as Emacs's +follow-mode shows it: #word("Follow") (#key("SPC c f")) adds a page right of +it, and each page starts where the one before ends; scrolling any of them, or +moving the cursor past a page's edge, moves through all of them as one. +#word("Unfollow") on a page's tag takes it out of the chain. + Closing a column's last pane leaves it empty; #word("Delcol") and #word("Joincol") take columns away. Closing the session's last pane quits pardes. diff --git a/docs/typ/reference.typ b/docs/typ/reference.typ index db090d24..7ffbd3ea 100644 --- a/docs/typ/reference.typ +++ b/docs/typ/reference.typ @@ -612,7 +612,8 @@ takes: its tag; #word("Window") (#key("Ctrl-w"), #key("SPC w")) picks the pane first: #keys("h", "j", "k", "l") move an outline, #key("Enter") or #key("Esc") or a pane's letter focuses, #key("d") is #word("Del") and - #key("c") #word("Collapse") on the outlined pane. + #key("c") #word("Collapse") on the outlined pane. #word("Follow") + (#key("SPC c f")) and #word("Unfollow"), below. - `get`: reload from the file (refused once over unsaved edits, `: Modified (get again to discard)`). It is an undo step, so #word("Undo") brings back what was there: the sure way back to the file on disk. - `lock`/`unlock` (acme's). The lock binds only clients that take it and belongs to the open that wrote it: `exec 3>$pane/ctl; echo lock >&3; ...; exec 3>&-`. A `lock` another open holds fails at once, `file in use` @@ -629,6 +630,27 @@ A file changed on disk reloads by itself only when the buffer has no unsaved edits; otherwise it stays dirty, says ` changed on disk (get reloads it, Save overwrites it)`, logs `changed `, and its next #word("Save") warns once. A file whose disk text is what the pane was read or saved as is no change: an #word("Undo") back across #word("Get") `file` or `e` to unsaved edits says nothing changed, and #word("Save") writes it. +== Follow + +#word("Follow") (#key("SPC c f")) is Emacs's follow-mode: one text across a +chain of panes as consecutive pages. On a file pane it adds a page, a +#word("Zerox") twin, at the end of the column right of the chain's last +page, or alone in a new column there when there is none; the keyboard stays +where it was. #word("Follow") on any page adds one after the last; on a twin +outside the chain it is refused (`Follow: this text has a chain: Follow on +one of its panes`). The pages, in column order, each start on the line after +the one before ends (a line wrapped on past a page's bottom starts the next +again), and scroll as one: the wheel, a page key, a jump or a #word("Look") +in any page moves the others with it. Each page keeps its own cursor; one +moved past its page's last row (or above its first) takes the keyboard to +the page showing its line, scrolling nothing, and past the chain's ends the +chain scrolls as one pane would. A page the chain made has #word("Unfollow") +on its tag: it takes the pane out, a plain twin with the scroll it has, and +the chain closes up. #word("Del") of a page leaves the chain too; the first +page left is the head, whose tag has no #word("Unfollow"), and a chain of +one is none. The chain is kept across #word("Dump") and #word("Restore"); +each window or terminal on the session scrolls its own. + == Addresses and data #file("addr"), #file("dot") and #file("limit") read the pair of byte -- cgit v1.3