From 275c6562773078759eff476e729afc6722c375d8 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Thu, 18 Apr 2024 14:24:49 +0100 Subject: [PATCH] Move some org-mode setq calls into use-package custom block --- init.el | 61 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/init.el b/init.el index d0de34a..de5d0a6 100644 --- a/init.el +++ b/init.el @@ -639,31 +639,21 @@ Try `magit-clone-default-directory' if available, fall back to (emms-cache-enable) (add-hook 'emms-player-started-hook #'emms-show)) -(setq org-directory "~/Documents/Org" - org-default-notes-file (expand-file-name "notes.org" org-directory) - org-attach-id-dir (expand-file-name "data/" org-directory) - org-hide-emphasis-markers nil - org-pretty-entities-include-sub-superscripts t - org-fontify-done-headline t - org-fontify-todo-headline t - org-fontify-emphasized-text t - org-fontify-quote-and-verse-blocks t - org-src-window-setup 'current-window - org-tags-column 0 - org-outline-path-complete-in-steps nil - org-return-follows-link t - org-mouse-1-follows-link t - org-link-descriptive t - org-enforce-todo-dependencies t - org-enforce-todo-checkbox-dependencies t - org-refile-use-outline-path t - org-refile-allow-creating-parent-nodes t - org-refile-use-outline-path 'file - org-refile-targets '((nil . (:maxlevel . 2)) - (org-agenda-files . (:maxlevel . 2)))) + (use-package org :custom + (org-directory "~/Documents/Org") + (org-default-notes-file (expand-file-name "notes.org" org-directory)) + (org-hide-emphasis-markers nil) + (org-pretty-entities-include-sub-superscripts t) + (org-fontify-done-headline t) + (org-fontify-todo-headline t) + (org-fontify-emphasized-text t) + (org-fontify-quote-and-verse-blocks t) + (org-tags-column 0) + (org-enforce-todo-dependencies t) + (org-enforce-todo-checkbox-dependencies t) (org-yank-folded-subtrees nil) (org-yank-adjusted-subtrees t) (org-M-RET-may-split-line '((default . nil) @@ -682,9 +672,30 @@ Try `magit-clone-default-directory' if available, fall back to (set-face-attribute 'org-verse nil :inherit 'variable-pitch) ;; Enable auto-fill in org-mode buffers (add-hook 'org-mode-hook #'turn-on-auto-fill) - ;; Visually indent org-mode files to a given header level - (require 'org-indent) - (add-hook 'org-mode-hook #'(lambda () (org-indent-mode +1)))) + ;; Extra `setq' calls to be moved somewhere else + (setq org-attach-id-dir (expand-file-name "data/" org-directory))) + +(use-package org-keys + :custom + (org-return-follows-link t) + (org-mouse-1-follows-link t)) + +(use-package org-indent + :after org + :hook org-mode) + +(use-package org-refile + :custom + (org-outline-path-complete-in-steps nil) + (org-refile-use-outline-path t) + (org-refile-allow-creating-parent-nodes t) + (org-refile-use-outline-path 'file) + (org-refile-targets '((nil . (:maxlevel . 2)) + (org-agenda-files . (:maxlevel . 2))))) + +(use-package org-src + :custom + (org-src-window-setup 'current-window)) (keymap-global-set "C-c o ." #'calendar) (keymap-global-set "C-c o a" #'org-agenda)