blob: 7853be344bc421e95a14940cb6bd09bf1ff01d68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
# Olivetti Org Implementation Plan
> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
**Goal:** Add `olivetti` to the Emacs config and enable it automatically for Org buffers in GUI and terminal sessions.
**Architecture:** Keep visual package ownership in `lisp/ss-ui.el` and Org-specific activation in `lisp/ss-org.el`. Update `README.md` so the package model and Org behavior remain accurate, then verify the hand-edited startup path in batch and terminal Emacs.
**Tech Stack:** Emacs Lisp, `use-package`, Org mode, `olivetti`
---
### Task 1: Add the visual package setup
**Files:**
- Modify: `lisp/ss-ui.el`
**Step 1: Write the failing test**
For this configuration-only change, there is no existing automated test harness
covering package declarations or minor-mode activation. Use startup
verification as the regression check for this unit.
**Step 2: Run test to verify it fails**
Not applicable for this repository layout. The useful red state is the absence
of `olivetti` configuration in the current source.
**Step 3: Write minimal implementation**
- Add a `use-package olivetti` declaration to `ss-ui`.
- Set a conservative width such as `olivetti-body-width 100`.
**Step 4: Run test to verify it passes**
Run: `emacs --batch -Q --load ./init.el`
Expected: startup completes without Lisp errors.
**Step 5: Commit**
Wait for verification and user approval before creating a commit.
### Task 2: Enable Olivetti for Org buffers
**Files:**
- Modify: `lisp/ss-org.el`
**Step 1: Write the failing test**
Use the same configuration exception as Task 1. There is no existing targeted
test scaffold for `org-mode-hook` behavior here.
**Step 2: Run test to verify it fails**
Not applicable. The current source does not add `olivetti-mode` to
`org-mode-hook`.
**Step 3: Write minimal implementation**
- Extend the existing `org-mode-hook` lambda to enable `olivetti-mode`.
**Step 4: Run test to verify it passes**
Run: `emacs --batch -Q --load ./init.el`
Expected: startup completes without Lisp errors.
Run: `emacs -nw --eval '(progn (load-file \"./init.el\") (with-current-buffer (get-buffer-create \"*olivetti-check*\") (org-mode) (princ (if olivetti-mode \"olivetti-on\" \"olivetti-off\"))))'`
Expected: output includes `olivetti-on`.
**Step 5: Commit**
Wait for verification and user approval before creating a commit.
### Task 3: Update documentation
**Files:**
- Modify: `README.md`
**Step 1: Write the failing test**
The failing condition is documentation drift: the current README does not list
`olivetti` or mention that Org buffers enable it automatically.
**Step 2: Run test to verify it fails**
Review `README.md` and confirm it lacks that behavior.
**Step 3: Write minimal implementation**
- Add `olivetti` to the package model.
- Add a short note in the Org workflow description that Org buffers enable
`olivetti-mode` for centered writing layout.
**Step 4: Run test to verify it passes**
Review the updated README text for accuracy against the code.
**Step 5: Commit**
Wait for verification and user approval before creating a commit.
### Task 4: Verify the complete change
**Files:**
- Verify only
**Step 1: Write the failing test**
Use the repository’s expected verification path rather than adding new tests.
**Step 2: Run test to verify it fails**
Not applicable before implementation.
**Step 3: Write minimal implementation**
No code changes in this task.
**Step 4: Run test to verify it passes**
Run: `emacs --batch -Q --load ./init.el`
Expected: exits successfully.
Run: `emacs -nw --eval '(progn (load-file \"./init.el\") (with-temp-buffer (org-mode) (princ (if olivetti-mode \"olivetti-on\" \"olivetti-off\"))))'`
Expected: prints `olivetti-on`.
**Step 5: Commit**
Wait for verification and user approval before creating a commit.
|