diff --git a/init.el b/init.el index 6d0187c..ef5de03 100644 --- a/init.el +++ b/init.el @@ -195,7 +195,13 @@ :custom (xref-show-definitions-function 'xref-show-definitions-completing-read)) +(use-package appt + :custom + (appt-display-diary nil) + (appt-display-format 'echo)) + (use-package calendar + :after appt :bind (("C-c >" . calendar)) :hook ((calendar-today-visible . calendar-mark-today)) :custom @@ -205,6 +211,7 @@ (calendar-view-holidays-initially-flag nil) (calendar-view-diary-initially-flag nil) :config + (appt-activate +1) (add-to-list 'display-buffer-alist '("\\*Calendar\\*" (display-buffer-in-side-window) @@ -213,11 +220,6 @@ (window-height . 0.2) (window-parameters . ((no-delete-other-windows . t)))))) -(use-package appt - :custom - (appt-display-diary nil) - (appt-display-format 'echo)) - (add-hook 'prog-mode-hook #'(lambda () (display-line-numbers-mode +1))) (use-package which-key @@ -475,34 +477,22 @@ (use-package ob-core :after org - :hook ((org-babel-after-execute . org-redisplay-inline-images))) + :hook ((org-babel-after-execute . org-redisplay-inline-images)) + :config + (let (babel-languages) + (push '(lua . t) babel-languages) + (push '(python . t) babel-languages) + (push '(emacs-lisp . t) babel-languages) + (org-babel-do-load-languages 'org-babel-load-languages babel-languages))) (use-package ob-python :after ob-core :custom (org-babel-python-command "python3")) -(use-package ob-jupyter - :after (ob-core jupyter)) - -(with-eval-after-load 'org - (let (babel-languages) - (when (require 'ob-jupyter nil :noerror) - (push '(jupyter . t) babel-languages)) - (push '(lua . t) babel-languages) - (push '(python . t) babel-languages) - (push '(emacs-lisp . t) babel-languages) - (org-babel-do-load-languages - 'org-babel-load-languages - babel-languages) - ) - ) - (use-package org-capture :after org - :bind - (("C-c n" . org-capture) - ("C-c C-n" . org-capture-goto-last-stored))) + :bind ("C-c n" . org-capture)) (use-package org-roam :after org @@ -541,14 +531,13 @@ (org-roam-dailies-directory "./") (org-roam-dailies-capture-templates '(("d" "default" entry - "* %?\n%U" + "* %<%H:%M> %?" :target (file+datetree "journal.org.gpg" week))))) (use-package org-agenda - :after org + :after (org appt) :bind (("C-c a" . org-agenda)) - :hook ((org-agenda-mode . (lambda () (appt-activate +1))) - (org-agenda-finalize . org-agenda-to-appt)) + :hook (org-agenda-finalize . org-agenda-to-appt) :custom (org-agenda-span 'week) (org-agenda-start-on-weekday 1) @@ -568,7 +557,9 @@ (org-agenda-files (list (expand-file-name org-directory) (expand-file-name "calendar" org-directory) - (expand-file-name "roam/journal.org.gpg" org-directory)))) + (expand-file-name "roam/journal.org.gpg" org-directory))) + :config + (appt-activate +1)) (use-package ox-icalendar :after org