orkmode/crates
Levi Neely c6bb21800a Resolve fuzzy org link targets across the full search ladder
Fuzzy link targets previously resolved only to an exact headline title or
a slug id, always with offset 0. Extend resolve_in_doc to follow the
Emacs org-link-search precedence:

  1. a <<target>> dedicated target (or <<<radio>>> radio target)
  2. an element named with #+NAME: target
  3. a headline whose title matches
  4. (compat) a section whose slug id matches
  5. the target text appearing literally in a section's content
     (case-insensitive)

Each branch returns the owning section plus a byte offset relative to the
start of that section's raw content, so a caller can later scroll within
/body. Dedicated-target and plain-text matches use lightweight scans over
the raw section slice (find_org_target, find_plain_text); #+NAME uses the
parsed affiliated keywords. The new section_content helper yields a
section's raw content region and its starting offset.

Fuzzy matching inherits the cross-document fallback already wrapping
resolve_in_doc, so a bare target can reach a <<target>>, named element,
or body text in another file.
2026-10-02 09:34:33 +02:00
..
org-ast Initial commit: org-mode parser and CLI 2026-09-30 09:43:21 +02:00
org-parser Add language plugin registry and Emacs-style #+RESULTS: formatting 2026-10-01 13:36:38 +02:00
ork-cli Add execute ctl verb for org-babel style code execution 2026-10-01 10:51:39 +02:00
ork-server Resolve fuzzy org link targets across the full search ladder 2026-10-02 09:34:33 +02:00