diff --git a/emacs/+org.el b/emacs/+org.el index d589057..69be4f7 100644 --- a/emacs/+org.el +++ b/emacs/+org.el @@ -2,14 +2,26 @@ (require 'org) (custom-set-variables '(org-directory "~/org/")) + +(defvar +org-capture-work-todo-file "work/todo.org" + "location for my work todo list. + +This is defined relative to the `org-directory' unless absolute.") + +(defun +org-capture-work-todo-file () + "Expand `+org-capture-work-todo-file' from `org-directory'. +If it is an absolute path return `+org-capture-work-todo-file' verbatim." + (expand-file-name +org-capture-work-todo-file org-directory)) + + (setq deft-directory org-directory org-download-image-dir (concat org-directory "resources") org-roam-directory org-directory) (setq org-agenda-files (list - (concat org-directory "work/todo.org") - (concat org-directory "todo.org") + (concat org-directory +org-capture-work-todo-file ) + ;;(concat org-directory "todo.org") ) ) ;(org-agenda-files (file-expand-wildcards (concat org-directory "*". )"~/ref/*.org") @@ -65,21 +77,11 @@ (0.5 . org-upcoming-deadline) (0.0 . org-upcoming-distant-deadline))) -;; Use appear to make org syntax easier to not fuck up. -;(use-package! org-appear -; :hook (org-mode . org-appear-mode) -; :config -; (setq org-appear-autoemphasis t -; org-appear-autosubmarkers t -; org-appear-autolinks nil) -; ;; for proper first-time setup, `org-appear--set-elements' -; ;; needs to be run after other hooks have acted. -; (run-at-time nil nil #'org-appear--set-elements)) - ;; Added Org-mode (add-hook 'org-mode-hook (lambda () - "Beautify Org Checkbox Symbol" + "Beautify Org Checkbox Symbol"` (push '("[ ]" . "☐") prettify-symbols-alist) + (push '("[_]" . "☐") prettify-symbols-alist) (push '("[X]" . "☑" ) prettify-symbols-alist) (push '("[-]" . "⊟" ) prettify-symbols-alist) (prettify-symbols-mode))) @@ -98,3 +100,13 @@ org-agenda-block-separator nil org-agenda-tags-column 100 ;; from testing this seems to be a good value org-agenda-compact-blocks t) + +(add-to-list 'org-capture-templates + '("w" "Work Todo" entry + (file+headline +org-capture-work-todo-file "Inbox") + "* [_] %?\n%i\n%a" :prepend t)) + +(setq org-roam-directory "~/org/roam") + + +(load! "org/+babel-diff")