From 60e40675c82efd17aa6bf31bc66c3f8f3f918360 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 10:26:47 -0300 Subject: Addresses search a line at a time as sam does, say why they fail, and a failed addr leaves no address addr's regexps ran mvzr over text[from..hi]: ^ and $ anchored only at the slice's ends, . matched newlines, the search never wrapped, and every failure read as bad address syntax. The regexps stay mvzr's, called the way sam searches (editors/acme/regx.c): one line per haystack, so ^ and $ fall at line boundaries and . never crosses a newline; a pattern naming \\n runs over the whole text with its . made [^\\n]; /re/ wraps unless limit is set, and ?re? takes the last match before the range. The ceiling (mvzr's first alternative, not sam's longest) is documented. A failed address says why (no match for regexp, address out of range, bad regular expression), and a failed write to addr leaves no address, so data and xdata refuse until the next good one instead of writing at the old range. Co-Authored-By: Claude Opus 5.5 --- .agents/skills/pardes-9p/SKILL.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '.agents') diff --git a/.agents/skills/pardes-9p/SKILL.md b/.agents/skills/pardes-9p/SKILL.md index 7e61b73d..0207f14c 100644 --- a/.agents/skills/pardes-9p/SKILL.md +++ b/.agents/skills/pardes-9p/SKILL.md @@ -126,7 +126,13 @@ For a file or scratch pane, with `pane=$m/pane/`: `addr`, `dot` and `limit` each read the pair of offsets they also accept, which is why copying one onto another is all that acme's `addr=dot`, `dot=addr` and `limit=addr` ever were; a write may also be an address expression (`#0,#5`, -`/pattern/`, `2+1`). Moving `dot` scrolls the pane to it. `limit` bounds a +`/pattern/`, `2+1`), whose regexps are mvzr's searched as sam searches: +`^`/`$` match at any line's start and end, `.` and `[^...]` never match a +newline, the leftmost match wins (the first alternative there, not the +longest), and `/re/` wraps unless `limit` is set. A failed address says +why (`no match for regexp`, `address out of range`) and leaves no address: +`data` refuses until the next good one, so a missed target is never +written at the old one. Moving `dot` scrolls the pane to it. `limit` bounds a search and reads empty until set; truncate it to lift it. `dirty`, `mark` and `scroll` read `0` or `1` and take `0` or `1`: whether the -- cgit v1.3