commit 433f0624f2cfa81e1473bb4665125cc7e16c8931 from: Isaac Meerleo date: Tue Jun 16 14:44:01 2026 UTC Switch journal capture from Markdown to org Write journal entries as slugged .org files under ~/org/me/journal/ with org #+title/#+date keywords instead of timestamped Markdown in ~/Journal/. commit - 0c253dabc0bdbef78bba6b5c04d1800f087464e7 commit + 433f0624f2cfa81e1473bb4665125cc7e16c8931 blob - 5122004a59f4c069e4856316448955e598df0e98 blob + 97b2fde8597a4626b0543d99dc9fb767e4ef699c --- doom/custom.el +++ doom/custom.el @@ -85,13 +85,18 @@ "* %?")) (add-to-list 'org-capture-templates - '("j" "Journal (Markdown)" plain + '("j" "Journal" plain (file (lambda () - (let* ((date-str (format-time-string "%Y-%m-%d-%H-%M")) - (custom-str (read-string "Journal Title: ")) - (filename (concat date-str "-" custom-str ".md"))) - (expand-file-name filename "~/Journal/")))) - "# %^{Title}\n\n%U\n\n%?" + (let* ((date-str (format-time-string "%Y-%m-%d-%H%M")) + (title (read-string "Journal Title: ")) + (slug (string-trim + (replace-regexp-in-string + "[^a-z0-9]+" "-" (downcase title)) + "-" "-")) + (filename (concat date-str "-" slug ".org"))) + (setq +journal--title title) + (expand-file-name filename "~/org/me/journal/")))) + "#+title: %(progn +journal--title)\n#+date: %U\n\n%?" :empty-lines 1))) @@ -99,9 +104,9 @@ (map! :leader :desc "Capture to inbox" "m i" (lambda () (interactive) (org-capture nil "i"))) -;; Keybinding for Journal (Markdown) +;; Keybinding for Journal (map! :leader - :desc "Journal (Markdown)" + :desc "Journal" "m j" (lambda! () (interactive) (org-capture nil "j"))) ;; Set custom org-todo items