From 43ae6f5cb0b709ef3d8eb3546fc7efcba1e8efa5 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 13 Dec 2024 07:23:41 +0000 Subject: [PATCH] Emacs: start switching to org-journal instead of org-roam-dailies Update org-agenda files, slightly re-ordered when packages are loaded to make it work. Already moved files around in org-directory but haven't moved old journal entries into new files yet. --- system/home/emacs/default.nix | 1 + system/home/emacs/init.el | 48 ++++++++++++++++++----------------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/system/home/emacs/default.nix b/system/home/emacs/default.nix index 9e461c4c..72f5b49b 100644 --- a/system/home/emacs/default.nix +++ b/system/home/emacs/default.nix @@ -50,6 +50,7 @@ # Other (TODO sort) diff-hl org-roam + org-journal org-noter citar vertico diff --git a/system/home/emacs/init.el b/system/home/emacs/init.el index ac5e8d36..a0b0259d 100644 --- a/system/home/emacs/init.el +++ b/system/home/emacs/init.el @@ -130,7 +130,7 @@ (window-parameters . ((no-delete-other-windows . t)))))) (use-package khalel - :after (org-agenda) + :after (appt org) :commands (khalel-run-vdirsyncer khalel-import-events khalel-add-capture-template) :custom (khalel-default-alarm "10") @@ -140,11 +140,7 @@ (khalel-import-org-file-confirm-overwrite nil) (khalel-import-start-date "today") (khalel-import-end-date "+365d") - (khalel-import-org-file-header "#+TITLE: khalel imported calendar events\n#+COLUMNS: %ITEM %TIMESTAMP %LOCATION %CALENDAR\n#+CATEGORY: Calendar\n\n") - :config - (khalel-import-events) - (org-agenda-to-appt) - (khalel-add-capture-template)) + (khalel-import-org-file-header "#+TITLE: khalel imported calendar events\n#+COLUMNS: %ITEM %TIMESTAMP %LOCATION %CALENDAR\n#+CATEGORY: Calendar\n\n")) (use-package sendmail :custom @@ -582,7 +578,7 @@ (" " . consult-org-heading)) :custom (org-directory "~/Documents/org") - (org-default-notes-file (expand-file-name "roam/inbox.org" org-directory)) + (org-default-notes-file (expand-file-name "inbox.org" org-directory)) (org-archive-default-command #'org-archive-to-archive-sibling) (org-hide-emphasis-markers t) (org-use-sub-superscripts '{}) @@ -681,15 +677,13 @@ (file+olp "tasks.org" "Inbox") "* TODO %?\nDEADLINE: %t\n %i\n %a"))) :config - (when (package-installed-p 'khalel) - (with-eval-after-load 'khalel - (khalel-add-capture-template)))) + (require 'khalel) + (khalel-add-capture-template)) (use-package org-roam :after org :defines org-roam-directory :functions org-roam-db-autosync-mode - :bind-keymap ("C-c n d" . org-roam-dailies-map) :bind (("C-c n r" . org-roam-capture) ("C-c n f" . org-roam-node-find) :map org-mode-map @@ -715,14 +709,22 @@ (window-parameters . ((no-delete-other-windows . t))))) (org-roam-db-autosync-mode +1)) -(use-package org-roam-dailies - :after org-roam +;; (use-package org-roam-dailies +;; :after org-roam +;; :custom +;; (org-roam-dailies-directory "./") +;; (org-roam-dailies-capture-templates +;; '(("d" "default" entry +;; "* %?" +;; :target (file+datetree "journal.org" week))))) + +(use-package org-journal + :after org + :demand + :bind ("C-c n d" . org-journal-new-entry) :custom - (org-roam-dailies-directory "./") - (org-roam-dailies-capture-templates - '(("d" "default" entry - "* %?" - :target (file+datetree "journal.org" week))))) + (org-journal-dir (expand-file-name "journal" org-directory)) + (org-journal-file-type 'monthly)) (use-package org-clock :after org @@ -742,7 +744,7 @@ (org-habit-show-habits-only-for-today t)) (use-package org-agenda - :after (org appt) + :after (appt org-journal) :bind (("C-c a" . org-agenda)) :hook ((org-agenda-mode . (lambda () (visual-line-mode -1))) (org-agenda-finalize . org-agenda-to-appt)) @@ -767,11 +769,11 @@ (search . " %-12:c"))) (org-agenda-file-regexp "\\`[^.].*\\.org\\\(\\.gpg\\\)?\\'") (org-agenda-files (list - (expand-file-name "tasks.org" org-directory) - (expand-file-name "calendar.org" org-directory) - (expand-file-name "roam/inbox.org" org-directory) - (expand-file-name "roam/journal.org" org-directory))) + (expand-file-name org-directory) + (expand-file-name org-journal-dir))) :config + (require 'khalel) + (khalel-import-events) (appt-activate +1) (org-agenda-to-appt) (setq org-agenda-custom-commands