From 54d6fb27edaef3eb7cb9405217adac15a8799f2b Mon Sep 17 00:00:00 2001 From: Daneel Date: Tue, 24 Feb 2026 15:08:12 +0100 Subject: [PATCH] refactor(snippets): metadata table + org headings structure; minimal TAB stops --- snippets/org-mode/adr | 28 ++++++++++++++++++---------- snippets/org-mode/meeting | 15 +++++++++------ snippets/org-mode/todo | 7 ++----- snippets/org-mode/weekly | 4 ---- 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/snippets/org-mode/adr b/snippets/org-mode/adr index 16924f7..16db487 100644 --- a/snippets/org-mode/adr +++ b/snippets/org-mode/adr @@ -2,14 +2,22 @@ # name: ADR - Architectural Decision Record # key: ;adr # -- -| *ID* | `(let ((max-id 0)) (save-excursion (goto-char (point-min)) (while (re-search-forward "| \\*ID\\*\\s-+|\\s-+ADR-\\([0-9]+\\)" nil t) (setq max-id (max max-id (string-to-number (match-string 1)))))) (format "ADR-%04d" (1+ max-id)))` | -| *Subject* | ${1:Title} | -|------------------------+---------------------------| -| *Problem statement* | | -| *Decision* | | -| *Alternatives* | | -| *Justification* | | -| *Implications* | | -| *Derived requirements* | | -| *Status* | ${2:Proposed} | +* `(let ((max-id 0)) (save-excursion (goto-char (point-min)) (while (re-search-forward "^\\* ADR-\\([0-9]+\\)" nil t) (setq max-id (max max-id (string-to-number (match-string 1)))))) (format "ADR-%04d" (1+ max-id)))` - ${1:Subject} + +| *ID* | `(let ((max-id 0)) (save-excursion (goto-char (point-min)) (while (re-search-forward "^\\* ADR-\\([0-9]+\\)" nil t) (setq max-id (max max-id (string-to-number (match-string 1)))))) (format "ADR-%04d" (1+ max-id)))` | +| *Subject* | ${1:Subject} | +| *Status* | ${2:Proposed} | +| *Date* | `(format-time-string "%Y-%m-%d")` | + +*** Problem statement + +*** Decision + +*** Alternatives + +*** Justification + +*** Implications + +*** Derived requirements $0 diff --git a/snippets/org-mode/meeting b/snippets/org-mode/meeting index 29b3ff8..25617a2 100644 --- a/snippets/org-mode/meeting +++ b/snippets/org-mode/meeting @@ -2,11 +2,14 @@ # name: Meeting notes # key: ;meeting # -- +* Meeting: ${1:Topic} — `(format-time-string "%Y-%m-%d")` + | *Date* | `(format-time-string "%Y-%m-%d")` | -| *Attendees* | ${1:names} | -| *Topic* | ${2:topic} | -|-------------+-----------------------------------| -| *Notes* | | -| *Actions* | | -| *Next* | | +| *Attendees* | ${2:names} | + +*** Notes + +*** Actions + +*** Next steps $0 diff --git a/snippets/org-mode/todo b/snippets/org-mode/todo index 9dc63f3..9bcd387 100644 --- a/snippets/org-mode/todo +++ b/snippets/org-mode/todo @@ -1,11 +1,8 @@ # -*- mode: snippet -*- -# name: TODO task with properties +# name: TODO task # key: ;todo # -- * TODO ${1:Task title} SCHEDULED: <`(format-time-string "%Y-%m-%d")`> -:PROPERTIES: -:context: ${2:work/personal} -:END: -${3:Notes} +${2:Notes} $0 diff --git a/snippets/org-mode/weekly b/snippets/org-mode/weekly index 57db296..d491874 100644 --- a/snippets/org-mode/weekly +++ b/snippets/org-mode/weekly @@ -5,14 +5,10 @@ * Weekly Review — `(format-time-string "W%V %Y")` ** Done this week -${1:- } ** In progress -${2:- } ** Blocked -${3:- } ** Next week focus -${4:- } $0