summaryrefslogtreecommitdiff
path: root/config.org
diff options
context:
space:
mode:
authorSzymon Szukalski <szymon@szymonszukalski.com>2026-04-02 13:58:14 +1100
committerSzymon Szukalski <szymon@szymonszukalski.com>2026-04-02 13:58:14 +1100
commit0d787210e8be2ffe53a44c2d8af95c849c776f53 (patch)
tree9e83aefce5c238504b01d39fa8cd91e23d673c62 /config.org
parent6107c2fe77e547a2d7c48150c48b19172b828d3c (diff)
Add central MOC startup note
Diffstat (limited to 'config.org')
-rw-r--r--config.org56
1 files changed, 56 insertions, 0 deletions
diff --git a/config.org b/config.org
index 592276f..02548ca 100644
--- a/config.org
+++ b/config.org
@@ -325,6 +325,8 @@ with the standard section layout already in place. Agenda views stay focused on
PARA notes, so project, area, and resource files can surface TODOs without
pulling in daily or archived notes. A small directory helper keeps PARA
subdirectories easy to create from the minibuffer before capturing into them.
+A curated =moc.org= in the Org root acts as the startup landing page and quick
+navigation surface without becoming a global fallback buffer.
#+begin_src emacs-lisp
(use-package org
@@ -460,6 +462,45 @@ If TIME is nil, use the current date."
(format-time-string "%Y-%m-%d.org" time)
ss/org-daily-directory))
+ (defun ss/moc-path ()
+ "Return the file name for the central MOC note."
+ (expand-file-name "moc.org" ss/org-directory))
+
+ (defun ss/moc-template ()
+ "Return the initial contents for the central MOC note."
+ (concat
+ "#+title: MOC\n\n"
+ "* Quick Access\n"
+ "- [[elisp:(ss/open-agenda)][Open agenda]]\n"
+ "- [[elisp:(ss/open-todays-note)][Today's note]]\n"
+ "- [[elisp:(org-capture nil)][Capture]]\n"
+ "- [[elisp:(denote-open-or-create)][New note]]\n\n"
+ "* Projects (active)\n"
+ "- Backend Chapter Uplift\n"
+ "- API Strategy\n"
+ "- Maturity Matrix\n"
+ "- DPT Ways of Working\n\n"
+ "* Areas\n"
+ "- My Role\n"
+ "- People and Performance\n"
+ "- SE Practice\n"
+ "- Stakeholder Alignment\n"
+ "- Engineering Department\n\n"
+ "* Resources (high leverage)\n"
+ "- API Strategy Reference\n"
+ "- Triage System\n"
+ "- Weekly Focus\n"))
+
+ (defun ss/ensure-moc ()
+ "Create the central MOC note when it does not exist.
+Return the path to the note."
+ (let ((file (ss/moc-path)))
+ (unless (file-exists-p file)
+ (make-directory (file-name-directory file) t)
+ (with-temp-file file
+ (insert (ss/moc-template))))
+ file))
+
(defun ss/daily-note-template (&optional time)
"Return the initial contents for the daily note at TIME."
(format "#+title: %s\n\n* Tasks\n\n* Notes\n\n* Open Loops\n"
@@ -481,13 +522,28 @@ Return the path to the note."
(interactive)
(find-file (ss/ensure-daily-note)))
+ (defun ss/open-moc ()
+ "Open the central MOC note."
+ (interactive)
+ (find-file (ss/ensure-moc)))
+
+ (defun ss/open-moc-on-startup ()
+ "Open the central MOC note during normal startup."
+ (when (and (equal (buffer-name (current-buffer)) "*scratch*")
+ (not buffer-file-name))
+ (ss/open-moc)))
+
(defun ss/open-agenda ()
"Refresh agenda files and invoke `org-agenda'."
(interactive)
(ss/ensure-org-agenda-loaded)
(call-interactively #'org-agenda))
+ :init
+ (add-hook 'emacs-startup-hook #'ss/open-moc-on-startup)
+ (ss/ensure-moc)
:bind (("C-c a" . ss/open-agenda)
("C-c c" . org-capture)
+ ("C-c n M" . ss/open-moc)
("C-c n m" . ss/create-note-subdirectory)
("C-c n d" . ss/open-todays-note))
:config