Files
dotfiles/emacs/.config/doom/+org.el
2020-03-20 23:12:22 -04:00

112 lines
3.9 KiB
EmacsLisp

;;; package --- summary +org.el
;;; lexical-binding: t; -*-
;;; Commentary:
;;; Code:
(after! org
(setq org-directory (expand-file-name "~/org/")
org-journal-dir "~/org/journal/"
org-agenda-files (list org-directory)
org-agenda-window-setup 'only-window
org-pretty-entities t
org-log-done 'time
;org-contacts-files '("~/org/contacts.org")
; attempt to return todo function to spacemacs
;evil-org-key-theme '(textobjects navigation additional insert todo)
;; show actually italicized text instead of /italicized text/
;org-agenda-block-separator ""
org-fontify-whole-heading-line t
org-fontify-done-headline t
org-fontify-quote-and-verse-blocks t
org-ellipsis ""
org-capture-templates
'(("i" "Send to inbox" entry (file+headline "~/org/inbox.org" "Inbox")
"* TODO %?\n")
("l" "Send to inbox with link" entry (file+headline "~/org/inbox.org" "Inbox")
"* TODO %?\n %i\n %a")
("w" "Work diary entry" entry (file "~/org/work_diary.org")
"* %u\n%?\n")
("u" "Add unblink entry" entry (file+headline "~/org/unblink.org" "Misc")
"* TITLE\n:PROPERTIES:\n:EXPORT_FILE_NAME: TITLE\n:EXPORT_DATE: %i\n:END:\n%?\n")
("n" "Add an idea" entry (file "~/org/ideas.org")
"* %?\nEntered on %U\n"))
org-todo-keywords
'((sequence "TODO(t)" "NEXT(n)" "MAYBE(m)" "|" "DONE(d)" "WONTDO(w)"))
org-todo-keyword-faces
'((("TODO" . (:foreground "red" :weight bold))
("NEXT" . (:foreground "blue"))
("MAYBE" . (:foreground "sea green"))
("WAITING" . (:foreground "forest green"))
("WONTDO" . (:foreground "forest green"))
("DONE" . (:foreground "light sea green"))))
org-agenda-span 5
org-agenda-start-day "1d"
;;org-use-tag-inheritance t; bug in variable below, just turn 'em off
org-tag-alist '(("@personal" . ?h)
("@farm" . ?f)
("@town" . ?s)
("@errand" . ?e)
("@15five" . ?w)
("@family" . ?m))
org-modules '(ol-eshell
ol-notmuch
ob-eval
ob-exp
ob-http
org-drill
org-id)))
;; Refiling
(setq org-refile-targets '((nil :maxlevel . 9)
(org-agenda-files :maxlevel . 9)))
(setq org-outline-path-complete-in-steps nil) ; Refile in a single go
(setq org-refile-use-outline-path t) ; Show full paths for refiling
;; org-set-tags-command
(setq +inbox-file "~/org/inbox.org")
(defun +open-inbox-file ()
(interactive)
"Opens the inbox file"
(find-file +inbox-file))
(map!
:leader
:desc "Open inbox" "I" #'+open-inbox-file
:desc "Open today" "T" #'org-roam-today
:desc "Open tomorrow" "N" #'org-roam-tomorrow)
(defun +show-agenda ()
(interactive)
(delete-other-windows)
(with-popup-rules! nil
(org-agenda-list)
(calendar))
(other-window 1)
(split-window-vertically)
(other-window 1)
(find-file +todo-file))
(map! :leader
(:prefix "f" :desc "Save all org buffers" "a" #'org-save-all-org-buffers))
(use-package! org-roam
:commands (org-roam-insert org-roam-find-file org-roam)
:init
(setq org-roam-directory "~/org/")
(map! :leader
:prefix "n"
:desc "Org-Roam-Insert" "i" #'org-roam-insert
:desc "Org-Roam-Find" "/" #'org-roam-find-file
:desc "Org-Roam-Buffer" "r" #'org-roam)
:config
(org-roam-mode +1))
(with-eval-after-load 'org-roam
(with-eval-after-load 'company
(with-eval-after-load 'org
(require 'company-org-roam)
(company-org-roam-init))))