2019-12-07 20:16:04 +01:00
|
|
|
;;; ~/.doom.d/+org.el -*- lexical-binding: t; -*-
|
|
|
|
;; Org mode configuration
|
|
|
|
;;
|
2020-02-23 14:10:38 +01:00
|
|
|
(setq org-ellipsis " ▼ "
|
2020-08-23 13:20:17 +02:00
|
|
|
org-superstar-headline-bullets-list '("⁖"))
|
2019-12-26 01:09:55 +01:00
|
|
|
;; Cycle through header visibility
|
2019-12-07 20:16:04 +01:00
|
|
|
(after! evil-org
|
2019-12-26 01:09:55 +01:00
|
|
|
(remove-hook 'org-tab-first-hook #'+org-cycle-only-current-subtree-h))
|
2019-12-31 05:56:59 +01:00
|
|
|
;; Disable completion
|
|
|
|
(set-company-backend! 'org-mode nil)
|
|
|
|
;; Turn off line numbers
|
2019-12-07 20:16:04 +01:00
|
|
|
(add-hook 'org-mode-hook (lambda () (display-line-numbers-mode -1)))
|
2020-01-23 14:49:15 +01:00
|
|
|
;; Add Notes to agenda
|
|
|
|
(setq org-agenda-files '("~/Notes"))
|
2019-12-07 20:16:04 +01:00
|
|
|
;; Tailor Org super agenda
|
|
|
|
(use-package! org-super-agenda
|
|
|
|
:after org-agenda
|
|
|
|
:init
|
2021-10-19 15:42:57 +02:00
|
|
|
(setq org-super-agenda-groups '((:name "Overdue"
|
|
|
|
:deadline past)
|
|
|
|
(:name "Due today"
|
|
|
|
:deadline today)
|
|
|
|
(:name "Important"
|
|
|
|
:priority "A")
|
|
|
|
(:name "Assignments"
|
|
|
|
:tag "labs"
|
|
|
|
:order 10)
|
|
|
|
(:name "Exams"
|
|
|
|
:tag "exams"
|
|
|
|
:order 10)))
|
2019-12-07 20:16:04 +01:00
|
|
|
:config
|
2020-04-02 01:42:51 +02:00
|
|
|
(org-super-agenda-mode))
|
2019-12-26 01:09:55 +01:00
|
|
|
;; Add timestamp to DONE task
|
|
|
|
(setq org-log-done 'time)
|
2020-09-22 15:36:52 +02:00
|
|
|
;; Print babel results to the buffer and export them
|
2020-11-01 11:46:42 +01:00
|
|
|
(setq org-babel-default-header-args '((:session . "default") (:results . "output") (:exports . "both")
|
2020-09-22 15:36:52 +02:00
|
|
|
(:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no"))
|
|
|
|
org-babel-default-lob-header-args '((:exports . "both")))
|
2020-01-26 14:06:00 +01:00
|
|
|
;; Enter writeroom-mode in all org files
|
|
|
|
(add-hook 'org-mode-hook 'global-writeroom-mode)
|
2020-03-09 17:05:02 +01:00
|
|
|
;; Respect LANGUAGE export variable
|
|
|
|
(add-to-list 'org-latex-packages-alist '("AUTO" "babel" t ("pdflatex")))
|
2020-04-02 01:42:51 +02:00
|
|
|
;; Don't evaluate code blocks on export
|
|
|
|
(setq org-export-use-babel nil)
|
2020-07-01 18:54:44 +02:00
|
|
|
;; Speed up agenda startup
|
|
|
|
(setq org-agenda-dim-blocked-tasks nil)
|
2020-10-12 16:35:37 +02:00
|
|
|
;; Open file with folded headlines
|
|
|
|
(setq org-startup-folded 'content)
|
2021-05-05 14:37:36 +02:00
|
|
|
;; Add tufte-handout to LaTeX classes
|
|
|
|
(after! ox-latex
|
|
|
|
(add-to-list 'org-latex-classes
|
|
|
|
'("tufte-handout"
|
|
|
|
"\\documentclass{tufte-handout}"
|
|
|
|
("\\section{%s}" . "\\section*{%s}")
|
|
|
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
|
|
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))
|
2021-06-24 15:25:24 +02:00
|
|
|
;; Add org-plain-latex
|
|
|
|
(after! ox-latex
|
|
|
|
(add-to-list 'org-latex-classes
|
|
|
|
'("org-plain-latex"
|
|
|
|
"\\documentclass{article}
|
|
|
|
[NO-DEFAULT-PACKAGES]
|
|
|
|
[PACKAGES]
|
|
|
|
[EXTRA]"
|
|
|
|
("\\section{%s}" . "\\section*{%s}")
|
|
|
|
("\\subsection{%s}" . "\\subsection*{%s}")
|
|
|
|
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
|
|
|
("\\paragraph{%s}" . "\\paragraph*{%s}")
|
|
|
|
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))))
|
|
|
|
;; Enable listings for LaTeX export
|
|
|
|
(setq org-latex-listings 't)
|
2021-06-27 21:21:23 +02:00
|
|
|
;; Set up bibliography management
|
2021-11-22 20:17:25 +01:00
|
|
|
(setq citar-bibliography '("~/Documents/Education/Other/References.bib"))
|
2021-10-19 15:42:57 +02:00
|
|
|
;; Add citeproc and metadata-file options to ox-pandoc
|
|
|
|
(after! ox-pandoc
|
|
|
|
(add-to-list 'org-pandoc-valid-options 'citeproc)
|
|
|
|
(add-to-list 'org-pandoc-valid-options 'metadata-file))
|
2021-07-02 17:07:10 +02:00
|
|
|
;; Allow referencing by label in org-ref
|
|
|
|
(setq org-latex-prefer-user-labels t)
|