diff options
Diffstat (limited to 'docs/fs.md')
| -rw-r--r-- | docs/fs.md | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -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 |
