From 4c4c4e7882b7faecef861e4ef69536ec84df897b Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 30 May 2024 18:26:27 +0100 Subject: [PATCH] Optimise loading order for citar-embark Reduce duplication in setting bibliography file variables, whilst also being a bit more flexible --- init.el | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/init.el b/init.el index 7ce3fb3..20b289f 100644 --- a/init.el +++ b/init.el @@ -768,15 +768,10 @@ it will be tried first." (org-noter-prefer-root-as-file-level nil)) (use-package citar - :after org :custom - (org-cite-global-bibliography + (citar-bibliography (list (expand-file-name "citar/main.bib" org-directory))) - (org-cite-insert-processor 'citar) - (org-cite-follow-processor 'citar) - (org-cite-activate-processor 'citar) - (citar-bibliography org-cite-global-bibliography) (citar-library-paths (list (expand-file-name "citar/library/" org-directory))) @@ -787,8 +782,14 @@ it will be tried first." (LaTeX-mode . citar-capf-setup) (org-mode . citar-capf-setup) :config + (require 'org) (require 'nerd-icons) (require 'citar-embark) + (setopt org-cite-insert-processor 'citar + org-cite-follow-processor 'citar + org-cite-activate-processor 'citar) + (dolist (bibfile citar-bibliography) + (add-to-list 'org-cite-global-bibliography bibfile)) (defvar citar-indicator-files-icons (citar-indicator-create :symbol (nerd-icons-octicon @@ -830,9 +831,11 @@ it will be tried first." citar-indicator-cited-icons))) (use-package citar-embark - :after (citar embark) + :after citar :diminish :init + (require 'embark) + :config (citar-embark-mode +1)) (setq org-latex-compiler "lualatex")