Org
Keep plans in Emacs Org mode and read them as a page: TODO badges, priorities, tags, deadlines and tick boxes.
What it shows
Rebuild an Org mode outline as rules.
What you learn
Headlines by the number of stars, words that become badges, marks that only count at word edges, tick boxes from a list line, lines and blocks that print nothing, source blocks with a language.
Try this
- Change the TODO before "Order seeds" to DONE, and its badge turns green.
Garden plan, spring 2026
Plot 14, Brook Lane allotments
TODO [#A] Order seeds spring
Tomatoes, three kinds of beans, and sweet peas. The order goes to the seed co-op with the club's.
| Seed | Packets | Price |
| Tomato, Gardener's Delight | 1 | 2.95 |
| Runner bean, Enorma | 2 | 5.40 |
| Sweet pea, Cupani | 1 | 2.60 |
TODO [#B] Build the cold frame [2/3] build
- Salvage the old window from the shed
- Cut the sides from the pallet
- Paint the frame
TODO [#B] Plan the beds spring
East bed
Potatoes this year, not brassicas. Club root is still in the soil.
- First earlies, Rocket
- Second earlies, Charlotte
West bed
Beans and peas
- Put up the canes
- Sow the peas under fleece
- Sow the beans when the frosts are over
DONE Lime the east bed soil
Lime the whole plot Only the east bed needed lime. The target was pH 6.5, and the readings are in soil.org.
Sow in cold soil and you sow twice. --- the plot next door
Sowing dates
Worked out from the last frost date the club uses, 20 April:
from datetime import date, timedelta
last_frost = date(2026, 4, 20)
for crop, weeks in {"tomatoes indoors": -8, "peas": -4, "beans": 1}.items():
print(f"{crop:18} {last_frost + timedelta(weeks=weeks)}")
How it's made
- Every mark here is a rule in the rules block. The stars at the start of a line make a headline, and the number of stars its level.
- TODO and DONE are word rules, drawn as badges.
[#A]is a priority,[2/3]a count of ticked boxes, and a word between colons a tag on the right. - A tick box is a list line with square brackets. A capital X in them ticks it.
- Lines that start with a hash and a space, and the
:PROPERTIES:drawer, never print. Switch to Source to see them.
Try it yourself
- Change the TODO before Order seeds to DONE. Its badge turns green.
- Tick the box before Paint the frame by writing X between its brackets, and change
[2/3]to[3/3]. - Change
** West bedto* West bed. It becomes a headline of its own. - Change
latein the palette to#e8590c. The deadline turns orange.
Next: Org-mode notes in the examples is a whole Org file, with an agenda, written with rules like these.
~~~ selfscribe
# Org: outlines in the style of Emacs Org mode. Use it with: use org
# Lesson: Rebuild an Org mode outline as rules.
# You learn: headlines by the number of stars, words that become badges, marks that only count at word edges, tick boxes from a list line, lines and blocks that print nothing, source blocks with a language.
# Try this: change the TODO before "Order seeds" to DONE, and its badge turns green.
# summary: Keep plans in Emacs Org mode and read them as a page: TODO badges, priorities, tags, deadlines and tick boxes.
# category: syntax
set title Org
# ---- #+TITLE: and #+SUBTITLE: at the top; any other line starting "# " never prints ---
line #+TITLE: _ -> h1
line #+SUBTITLE: _ -> p.org-subtitle { margin: -0.4em 0 1.6em; font-size: 1.05em; opacity: 0.7 } as org-subtitle
line # _ -> hidden
# ---- Headlines: one star, two stars, three stars, each folding what is under it --------
line * _ -> h2 fold 1
line ** _ -> h3 fold 2
line *** _ -> h4 fold 3
# ---- Colours, each with its shade for dark pages -------------------------------------
palette
todo #c92a2a dark #ff8787
done #2b8a3e dark #69db7c
stamp #6741d9 dark #b197fc
late #c92a2a dark #ff8787
# ---- TODO and DONE anywhere: a state badge; [#A] a priority; [2/3] a count; :tag: on the right
class org-state { font: 700 0.6em/1 var(--doc-font-mono); padding: 0.32em 0.5em; border-radius: 4px; vertical-align: 0.22em; letter-spacing: 0.04em; color: var(--on-todo) }
word TODO -> span.org-state { background: var(--todo) } as org-todo
word DONE -> span.org-state { background: var(--done); color: var(--on-done) } as org-done
inline [#_] -> span.org-prio keep { font: 700 0.6em/1 var(--doc-font-mono); vertical-align: 0.22em; padding: 0.3em 0.4em; border-radius: 4px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); opacity: 0.75 } as org-prio
inline [_#/_#] -> span.org-count keep { font: 600 0.6em/1 var(--doc-font-mono); vertical-align: 0.22em; color: var(--stamp) } as org-count
inline :_: -> span.org-tag bound { float: right; font: 500 0.55em/1 var(--doc-font-mono); padding: 0.5em 0.65em; margin-top: 0.35em; border-radius: 999px; background: color-mix(in srgb, currentColor 9%, transparent) } as org-tag
# ---- Dates in angle brackets, and the SCHEDULED: and DEADLINE: lines under a headline ---
inline <_> -> time.org-ts keep { color: var(--stamp) } as org-ts
class org-plan { margin: -0.3em 0 0.7em; font: 0.8em/1.6 var(--doc-font-mono) }
line SCHEDULED: _ -> div.org-plan keep { opacity: 0.8 } as org-scheduled
line DEADLINE: _ -> div.org-plan keep { color: var(--late) } as org-deadline
# ---- A :PROPERTIES: drawer down to :END: keeps notes for Org itself; it never prints -----
block :PROPERTIES: ... :END: -> hidden verbatim
# ---- Marks inside a sentence: *bold* /italic/ _underline_ =code= ~code~ +struck+ ---------
# bound: a mark only counts at the edge of a word, so a path like beds/east stays as typed.
inline *_* -> b bound
inline /_/ -> i bound
inline \__\_ -> u bound
inline =_= -> code verbatim bound
inline ~_~ -> code verbatim bound
inline +_+ -> s bound
# ---- Links: [[address][words]] or just [[address]] --------------------------------------
inline [[_][_]] -> a href=_1 _2
inline [[_]] -> a href=_1 _1
# ---- Lists: "- [ ] " a box to tick, "- [X] " a ticked one, "- " a point, "1. " a step ----
class org-box { list-style: none; margin-left: -1.2em }
line - [ ] _ -> li.org-box group ul nest input=checkbox as org-box
line - [X] _ -> li.org-box group ul nest input=checkbox checked { opacity: 0.6; text-decoration: line-through } as org-box-done
line - _ -> li group ul nest
line _#. _ -> li group ol nest
# ---- Tables: | between cells; a |---| line under the header prints nothing ---------------
line | _ | -> tr group table split "|" td
line |-_| -> hidden
# ---- #+BEGIN_SRC lang to #+END_SRC: code; #+BEGIN_QUOTE to #+END_QUOTE: a quote ----------
block #+BEGIN\_SRC _ ... #+END\_SRC -> code lang=_1 verbatim
block #+BEGIN\_QUOTE ... #+END\_QUOTE -> blockquote
~~~
#+TITLE: Garden plan, spring 2026
#+SUBTITLE: Plot 14, Brook Lane allotments
# A comment line. Lines that start with a hash and a space never print.
* TODO [#A] Order seeds :spring:
DEADLINE: <2026-02-28 Sat>
Tomatoes, /three/ kinds of beans, and =sweet peas=. The order goes to [[https://example.com/seeds][the seed co-op]] with the club's.
:PROPERTIES:
:BUDGET: 40
:END:
| Seed | Packets | Price |
|------|---------|-------|
| Tomato, Gardener's Delight | 1 | 2.95 |
| Runner bean, Enorma | 2 | 5.40 |
| Sweet pea, Cupani | 1 | 2.60 |
* TODO [#B] Build the cold frame [2/3] :build:
- [X] Salvage the old window from the shed
- [X] Cut the sides from the pallet
- [ ] Paint the frame
* TODO [#B] Plan the beds :spring:
SCHEDULED: <2026-03-14 Sat>
** East bed
Potatoes this year, _not_ brassicas. Club root is still in the soil.
- First earlies, Rocket
- Second earlies, Charlotte
** West bed
*** Beans and peas
1. Put up the canes
2. Sow the peas under fleece
3. Sow the beans when the frosts are over
* DONE Lime the east bed :soil:
+Lime the whole plot+ Only the east bed needed lime. The target was ~pH 6.5~, and the readings are in [[soil.org]].
#+BEGIN_QUOTE
Sow in cold soil and you sow twice. --- the plot next door
#+END_QUOTE
* Sowing dates
Worked out from the last frost date the club uses, 20 April:
#+BEGIN_SRC python
from datetime import date, timedelta
last_frost = date(2026, 4, 20)
for crop, weeks in {"tomatoes indoors": -8, "peas": -4, "beans": 1}.items():
print(f"{crop:18} {last_frost + timedelta(weeks=weeks)}")
#+END_SRC
* How it's made
- Every mark here is a rule in the rules block. The stars at the start of a line make a headline, and the number of stars its level.
- TODO and DONE are word rules, drawn as badges. =[#A]= is a priority, =[2/3]= a count of ticked boxes, and a word between colons a tag on the right.
- A tick box is a list line with square brackets. A capital X in them ticks it.
- Lines that start with a hash and a space, and the =:PROPERTIES:= drawer, never print. Switch to Source to see them.
* Try it yourself
1. Change the TODO before Order seeds to DONE. Its badge turns green.
2. Tick the box before Paint the frame by writing X between its brackets, and change =[2/3]= to =[3/3]=.
3. Change =** West bed= to =* West bed=. It becomes a headline of its own.
4. Change =late= in the palette to =#e8590c=. The deadline turns orange.
*Next:* /Org-mode notes/ in the examples is a whole Org file, with an agenda, written with rules like these.