summaryrefslogtreecommitdiff
path: root/docs/fs.md
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 13:14:20 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit41fb292f314844d1f47e608fbdd4a34cfc8d5618 (patch)
tree5f0b6f9bd6feddb88881623a6d990bcab454021e /docs/fs.md
parent84fca2d6e5f498f2d4384712d49d727a25441d68 (diff)
downloadpardes-41fb292f314844d1f47e608fbdd4a34cfc8d5618.tar.gz
pardes-41fb292f314844d1f47e608fbdd4a34cfc8d5618.zip
An address searches back after a minus, and a range ending before its start is refused
-/re/ searched forward, since only ?re? set the direction, where acme's address() takes the direction a minus set (addr.c). And #100,#50 was taken, leaving data to act on an empty range at 100; sam refuses it as 'addresses out of order', which acme leaves out, and so does pardes now. The rest of the dogfood report on addresses already held and is now tested: an expression is evaluated from the current address, as acme evaluates it from w->addr (xfid.c:446), so a search starts where the last address or data write left it and . is that address. Taking . as the selection instead, as the report asked, would part from acme, which has dot only in its ctl messages; the docs say which is which. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/fs.md')
-rw-r--r--docs/fs.md17
1 files changed, 12 insertions, 5 deletions
diff --git a/docs/fs.md b/docs/fs.md
index 65b987d8..03f250af 100644
--- a/docs/fs.md
+++ b/docs/fs.md
@@ -298,10 +298,14 @@ lazy `*?` included), searched the way sam searches (editors/acme/regx.c): as
lines, so `^` and `$` match at the start and end of any line, `.` and a
negated class never match a newline, and `$` also matches at the end of a
text with no final newline. A pattern that names a newline (`\n`) runs over
-the whole text instead, its `.` kept to one line. `/re/` searches forward
-from the end of the current range to `limit` if one is set, and otherwise
-wraps to the start of the text; `?re?` finds the last match ending before
-the range, wrapping to the text's last. The match is the leftmost, but of
+the whole text instead, its `.` kept to one line. An expression is
+evaluated from the current address, the range last written to `addr` (or
+left by the last `data` write, just past it), as acme evaluates it from
+`w->addr` (xfid.c:446): `.` is that address, not the selection (`dot` is
+the selection's own file), and `#9/re/` searches from `#9`. `/re/` searches
+forward from the end of the current range to `limit` if one is set, and
+otherwise wraps to the start of the text; `?re?` and `-/re/` find the last
+match ending before the range, wrapping to the text's last. The match is the leftmost, but of
the alternatives at that place mvzr takes the first that matches where sam
takes the longest (`/gam|gamma/` finds `gam`); in a search begun in the
middle of a line, `^` inside an alternation can match there; and in a
@@ -319,7 +323,10 @@ is the one place both call), so `^` there also means a line's start.
An address that does not evaluate fails the write with why: `bad address
syntax`, `no match for regexp`, `address out of range`, `bad regular
-expression` or `regular expression search took too long`. A failed write to `addr` leaves no address at all, where acme
+expression`, `regular expression search took too long`, or sam's
+`addresses out of order` for a range that ends before it starts
+(`#100,#50`), which acme lets through. A failed write to `addr` leaves no
+address at all, where acme
keeps the old one: until an address is written or `addr` is truncated,
reading `addr`, and reading, writing or truncating `data` and `xdata`, fail
with `no address: the last one written to addr failed`, so a script that