nixos/home/emacs/modules/custom-org-config.el

49 lines
1.8 KiB
EmacsLisp

(let)
(setq org-directory "~/Org"
org-journal-dir (expand-file-name "journal" org-directory)
org-journal-file-type 'daily
org-journal-file-format "%Y%m%d.org"
org-agenda-files '("~/Org/")
org-agenda-sticky t
org-agenda-prefix-format '((agenda . " %i %t %s")
(todo . " %i")
(tags . " %i")
(search . " %i"))
org-refile-use-outline-path t
org-refile-allow-creating-parent-nodes t
org-refile-targets '((nil :maxlevel . 3)
(org-agenda-files :maxlevel . 3))
;; Without this, completers like ivy/helm are only given the first level of
;; each outline candidates. i.e. all the candidates under the "Tasks" heading
;; are just "Tasks/". This is unhelpful. We want the full path to each refile
;; target! e.g. FILE/Tasks/heading/subheading
org-refile-use-outline-path 'file
org-outline-path-complete-in-steps nil
org-default-notes-file (expand-file-name "notes.org" org-directory))
(let ((project-template "#+title: ${title}\n#+category: ${title}\n* Goals\n\n* [%] Tasks\n\n* Notes\n\n* References\n"))
(setq org-capture-templates
'(("n" "Note" entry
(file+headline "notes.org" "Inbox")
"* %u %?\n%i\n%a"
:prepend t
:empty-lines 1)
("t" "Task" entry
(file+headline "todo.org" "Inbox")
"* TODO %?\n%i\n%a"
:prepend t
:emptry-lines 1)
)))
(when (require 'hydra nil :noerror)
(defhydra org (global-map "C-c o")
"Org-Mode"
("a" org-agenda)
("c" org-capture)
("j c" calendar)
("j j" org-journal-new-entry)
("j n" org-journal-new-date-entry)
("j s" org-journal-new-scheduled-entry)))
(provide 'custom-org-config)