fix(snippets): adaptive heading level; subject mirror in heading+table

This commit is contained in:
2026-02-24 15:15:14 +01:00
parent 54d6fb27ed
commit f363782bd5
4 changed files with 21 additions and 20 deletions

View File

@@ -2,22 +2,22 @@
# name: ADR - Architectural Decision Record
# key: ;adr
# --
* `(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}
`(make-string (1+ (or (org-current-level) 0)) ?*)` ${1:`(let ((max-id 0)) (save-excursion (goto-char (point-min)) (while (re-search-forward (concat "^\\*+ ADR-\\([0-9]+\\)") nil t) (setq max-id (max max-id (string-to-number (match-string 1)))))) (format "ADR-%04d" (1+ max-id)))`} - ${2: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} |
| *ID* | $1 |
| *Subject* | $2 |
| *Status* | ${3:Proposed} |
| *Date* | `(format-time-string "%Y-%m-%d")` |
*** Problem statement
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Problem statement
*** Decision
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Decision
*** Alternatives
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Alternatives
*** Justification
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Justification
*** Implications
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Implications
*** Derived requirements
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Derived requirements
$0

View File

@@ -2,14 +2,15 @@
# name: Meeting notes
# key: ;meeting
# --
* Meeting: ${1:Topic} — `(format-time-string "%Y-%m-%d")`
`(make-string (1+ (or (org-current-level) 0)) ?*)` Meeting: ${1:Topic} — `(format-time-string "%Y-%m-%d")`
| *Date* | `(format-time-string "%Y-%m-%d")` |
| *Topic* | $1 |
| *Attendees* | ${2:names} |
*** Notes
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Notes
*** Actions
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Actions
*** Next steps
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Next steps
$0

View File

@@ -2,7 +2,7 @@
# name: TODO task
# key: ;todo
# --
* TODO ${1:Task title}
`(make-string (1+ (or (org-current-level) 0)) ?*)` TODO ${1:Task title}
SCHEDULED: <`(format-time-string "%Y-%m-%d")`>
${2:Notes}
$0

View File

@@ -2,13 +2,13 @@
# name: Weekly review
# key: ;weekly
# --
* Weekly Review — `(format-time-string "W%V %Y")`
`(make-string (1+ (or (org-current-level) 0)) ?*)` Weekly Review — `(format-time-string "W%V %Y")`
** Done this week
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Done this week
** In progress
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` In progress
** Blocked
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Blocked
** Next week focus
`(make-string (+ 2 (or (org-current-level) 0)) ?*)` Next week focus
$0