:'grep', :"snippet", :/regex/, :symbolRuled 2026-09-18 (gritzko): links follow Pike's sam/Acme file:address shape, not full URIs. After the target's : comes exactly ONE anchor: a line, a substring '…', a spot snippet "…", a regex /…/, or a bare symbol. Only the line anchor is rev-proofed with a hashlet; the rest resolve in the current tree, first match wins. This umbrella holds the ruled grammar; the work is in the four subs.
tok/LINK.rl:88:GG line, tok/LINK.rl:89:GG commit: digits, or digits plus a 2..10 char hashlet (DOG-043).file:12, file:/re/), which the Plan 9 plumber resolves off plain prose; an index resolves ours.#L123, #needle, #/re/, #'pat'; links differ, see below.HUNKu8sMakeURI (HUNK.c:1621) titles hunks path#sym:L42, so the symbol anchor has a twin already.:30, :30:12, :30:LjJu stay as they are; a hashlet always carries a non-digit, an all-digit second code is a column.:'Compose URI' is a substring, :/CAPO\w+Grep/ a regex.:"ok64 $1 = OK;" is a spot snippet; its variables wear a $ (2026-09-18), so plain code in it is always literal.$1..$9 bind exactly ONE token, $a..$z a balanced block of ZERO or more, $A..$Z a block of ONE or more.:name symbol: the definition of name in the target, by per-file-type templates ($0($a){$b}); $0 is the name slot.abc/Makefile:'ragel', DOG-034:'Blockers'.either/or:pick would fuse..c:/re/, abc/:'grep', abc/.c:"f(x)": an ext family, a subtree, or both (SPOT-004)..c:HUNKu8sMakeURI finds the definition anywhere..c:30 is nothing, and a scope is never minted.tok/LINK.rl:88:GG names the repo as Rep: and //name worktrees do; it heads scopes too.12,20 and 1599/re/ are out).\; one ragel shape serves all three, no hand parsing anywhere (abc).seg and wants a path and an anchor after it: //localhost:8080 and https://foo.io/bar.c stay prose.'…' is verbatim text, "…" is where the variables ($1, $a, $A) bind.$ over bare letters: a one-letter name (i, union U) was a variable and could never be matched as itself (BEE-074).f($a) takes f(), f($A) does not; uppercase keeps its old meaning exactly.;; two adjacent blocks are a malformed needle.$x are swapped for opaque identifiers BEFORE lexing, in every language alike: Go, Python, Rust cut $ off.$$ is a literal $, for the languages where $1 and $i are code (shell, awk, Perl, PHP)."f($1)" is f() to sh, fish and PowerShell alike.String.replace, where $1 means something else.#'pat' is the token pattern and a bare #needle the substring: align, or live with two?N tags.* spells */ and closes a C block comment; such a link goes in a // comment or ends in {0,}.**/*.c spells */, dir/*.c spells /* (-Wcomment), * is Markdown emphasis.**/ would be redundant anyway: a target is an index-resolved suffix, so .c is any depth and /abc/.c anchors it.* INSIDE a basename (test_*.c:'x'); no */ or /* can arise there. Not ruled, not in the subs.dir/.ext composition is SPOT-004's proposal and gets ruled here or there.// headtok.link//repo links$: $1, $a, $A, $0//name:anchor is a link: an authority needs no path