Commit 51ec07469f
Verified · cmc
Layout: unified · split
docs/plans/2026-10-05-options.md added +33
| @@ -0,0 +1,33 @@ | |||
| 1 | # Editing Options Implementation Plan | ||
| 2 | |||
| 3 | > **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. | ||
| 4 | |||
| 5 | **Goal:** The org options that change what commands write become settings, so Orgstar can follow the user's Emacs: `org-tags-column`, `org-insert-heading-respect-content`, `org-M-RET-may-split-line`, `org-list-allow-alphabetical`, and the default TODO keywords. | ||
| 6 | |||
| 7 | **Architecture:** `EditingOptions` travels in `EditContext` and `EmacsBuffer`; tag alignment, heading and item insertion, and list bullets read it. Alphabetical lists add `org-list-use-alpha-bul-p` and the alphabetical branches of `org-list-struct-fix-bul`. Default TODO keywords come from a `#+TODO`-syntax line (`OrgSettings.withTodoKeywords`); the index settings version follows them, so changing them reindexes. The app keeps all of it in Settings. | ||
| 8 | |||
| 9 | **Tech Stack:** Swift 6.2 tools, SwiftUI, Swift Testing, Emacs 31.1 / Org 9.8.7 oracle. | ||
| 10 | |||
| 11 | **Spec:** `docs/design.md`, "Commands and keymaps". | ||
| 12 | |||
| 13 | ## Why | ||
| 14 | |||
| 15 | The user's Emacs is Doom, which sets tags column 0, M-RET after the subtree without splitting, alphabetical lists, and the keywords TODO PROJ LOOP STRT WAIT HOLD IDEA | DONE KILL. Their notes use KILL and have no `#+TODO` lines; 499 of 522 tagged headings end their tags at column 77. | ||
| 16 | |||
| 17 | ## Defaults chosen (user may change) | ||
| 18 | |||
| 19 | - Tags aligned to column 77 (as the files are), not Doom's 0. | ||
| 20 | - M-RET after the subtree, no splitting, alphabetical lists, and Doom's main keyword sequence, as the user's Emacs does today. | ||
| 21 | |||
| 22 | --- | ||
| 23 | |||
| 24 | ### Task 1: Options in commands | ||
| 25 | |||
| 26 | - [ ] `EditingOptions`; plumb through every command; alphabetical bullets. | ||
| 27 | - [ ] Oracle: heading, structure and list suites again under the Doom options (`withOptions` binds the variables around each case), plus alphabetical list variants. | ||
| 28 | - [ ] Commit "Make org editing options settings". | ||
| 29 | |||
| 30 | ### Task 2: App | ||
| 31 | |||
| 32 | - [ ] Settings section; options to the editor and session; default keywords to documents and the index at launch. | ||
| 33 | - [ ] Commit "Org options in Settings". | ||