From 847c8ed4765a4f18f336ef0e8932ee0d7fc90d71 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Thu, 11 Apr 2024 21:28:08 -0400 Subject: [PATCH] fix(emacs): move some org hooks into use-package Signed-off-by: Lucas Sta Maria --- .emacs.d/include/orgconfig.el | 3 --- .emacs.d/init.el | 10 +++++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.emacs.d/include/orgconfig.el b/.emacs.d/include/orgconfig.el index efe427a..9c66450 100644 --- a/.emacs.d/include/orgconfig.el +++ b/.emacs.d/include/orgconfig.el @@ -130,9 +130,6 @@ (lambda () (add-hook 'auto-save-hook 'org-save-all-org-buffers nil t) (auto-save-mode))) -(add-hook 'org-mode-hook #'olivetti-mode) -(add-hook 'org-mode-hook #'org-modern-mode) -(add-hook 'org-mode-hook #'org-recur-mode) (add-hook 'org-mode-hook #'variable-pitch-mode) (add-hook 'org-agenda-mode-hook #'org-recur-mode) (add-hook 'org-mode-hook #'org-modern-indent-mode 90) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index b8dd120..cedf781 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -86,8 +86,11 @@ ;; Org (use-package org :straight t) -(use-package org-roam :straight t) -(use-package org-modern :straight t) +(use-package org-roam :straight t + :after (org)) +(use-package org-modern :straight t + :after (org) + :hook (org-mode org-modern-mode)) (use-package org-modern-indent :straight '(org-modern-indent @@ -107,7 +110,8 @@ :straight '(pdf-tools :type git :host github :repo "vedang/pdf-tools")) -(use-package olivetti :straight t) +(use-package olivetti :straight t + :hook (org-mode . olivetti-mode)) (use-package rg :straight t) (use-package anzu :straight t :init