User commands: org.run and keyboard macros !528

merged merged by cmc on 2026-11-27 16:25 UTC · krz/orgstar:issue-246-org-run into main

Discussion

cmc 2026-11-27 16:01 UTC
  • org.run(id) runs built-in OrgCore commands on the user command's current text and resolves with {text, selection}. Every change of one user command (its org.run calls and its own edits) is one undo step at the base revision. Prompts go through the command's prompt; a failure rejects with the built-in's message.
  • Refused: app.* except app.save (saves after the changes apply), user.*, editor commands, and commands returning .external (Babel, Emacs tables, links, tangling, views).
  • On the Mac and iOS, user command prompts go through the editor, so macros record their answers. A replaying macro waits for a user command to finish before its next key, including inside nested named macros.
  • Manual: org.run section, porting table, keyboard macros.

Checks: swift test passes (#240 flaked once, passed on rerun). Mac and iOS Xcode builds have no warnings in Sources/. GateTests failed open/typing timings at load 7–12, a different metric each run; not rerun at low load.

Closes #246

Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form