From 85f2bdc8ccdd9c18147b5c9dfbef5bbbb8a48ab1 Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Tue, 3 Dec 2024 21:46:26 +0100 Subject: [PATCH] tweak(org): better deferring of Org related packages (cherry picked from commit 5edcdd9d37a3d2e2c35bc6c73752b4f7b84b81e9) --- core/me-builtin.el | 4 +--- modules/me-org.el | 9 ++++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/core/me-builtin.el b/core/me-builtin.el index b79866fb..3fefeabd 100644 --- a/core/me-builtin.el +++ b/core/me-builtin.el @@ -694,6 +694,7 @@ or file path may exist now." (use-package org :ensure t + :defer 10 ; load after 10s of inactivity :preface ;; Set to nil so we can detect user changes (in config.el) (setq org-directory nil) @@ -805,7 +806,6 @@ or file path may exist now." (org-agenda-tags-column 0)) (use-package ox-latex - :after ox :custom (org-latex-src-block-backend 'engraved) (org-latex-prefer-user-labels t) @@ -861,8 +861,6 @@ or file path may exist now." (mapc #'require '(ox-odt ox-beamer ox-koma-letter))) (use-package oc - :after org - :demand :custom (org-cite-export-processors '((latex biblatex) (t csl))) (org-support-shift-select t) diff --git a/modules/me-org.el b/modules/me-org.el index adbb6657..613864db 100644 --- a/modules/me-org.el +++ b/modules/me-org.el @@ -66,8 +66,7 @@ ;; Modern Org style (use-package org-modern :ensure t - :hook (org-mode . org-modern-mode) - :hook (org-agenda-finalize . org-modern-agenda) + :after org :custom-face ;; Force monospaced font for tags (org-modern-tag ((t (:inherit org-verbatim :weight regular :foreground "black" :background "LightGray" :box "black")))) @@ -85,7 +84,9 @@ ("KILL" . (:inherit org-verbatim :weight semi-bold :foreground "white" :background "DarkGreen")) ("PROJ" . (:inherit org-verbatim :weight semi-bold :foreground "white" :background "LimeGreen")) ("HOLD" . (:inherit org-verbatim :weight semi-bold :foreground "white" :background "orange")) - ("DONE" . (:inherit org-verbatim :weight semi-bold :foreground "black" :background "LightGray"))))) + ("DONE" . (:inherit org-verbatim :weight semi-bold :foreground "black" :background "LightGray")))) + :init + (global-org-modern-mode 1)) ;; Automatically toggle Org mode LaTeX fragment previews as the cursor enters and exits them @@ -105,8 +106,6 @@ ;; Emacs package to quickly find and act on bibliographic references, and edit org, markdown, and latex academic documents (use-package citar :ensure t - :after minemacs-first-org-file oc - :demand :custom (org-cite-insert-processor 'citar) (org-cite-follow-processor 'citar)