2021-02-23 16:09:07 +00:00
|
|
|
;; The all-powerful Org mode
|
|
|
|
|
|
|
|
(use-package org
|
|
|
|
:straight org-plus-contrib
|
|
|
|
:mode (("\\.org\\'" . org-mode))
|
|
|
|
:init
|
|
|
|
(leader-def-key "o" '(nil :which-key "org"))
|
2021-03-02 01:29:23 +00:00
|
|
|
:config
|
|
|
|
(add-hook 'org-mode-hook #'auto-fill-mode)
|
2021-05-12 15:03:16 +00:00
|
|
|
(add-hook 'org-mode-hook (lambda () (require 'org-attach)))
|
2021-02-23 16:09:07 +00:00
|
|
|
:custom
|
|
|
|
(org-agenda-files `(,(expand-file-name "~/org/todo.org")
|
|
|
|
,(expand-file-name "~/org/deft/unifydb.org")
|
|
|
|
,(expand-file-name "~/org/lola-gcal.org")
|
|
|
|
,(expand-file-name "~/org/personal-gcal.org")
|
|
|
|
,(expand-file-name "~/org/j-n-gcal.org")))
|
|
|
|
(org-todo-keywords '((sequence
|
|
|
|
"TODO(t)"
|
|
|
|
"IN PROGRESS(i)"
|
|
|
|
"BLOCKED(b)"
|
|
|
|
"|"
|
|
|
|
"DONE(d)"
|
|
|
|
"CANCELLED(c)")))
|
2021-02-24 21:51:53 +00:00
|
|
|
(org-capture-templates `(("l" "Lola task" entry
|
|
|
|
(file+headline ,(expand-file-name "~/org/todo.org") "Lola")
|
|
|
|
"* TODO %i%?")
|
|
|
|
("p" "Personal task" entry
|
|
|
|
(file+headline ,(expand-file-name "~/org/todo.org") "Personal")
|
|
|
|
"* TODO %i%?")))
|
2021-02-23 16:09:07 +00:00
|
|
|
(org-return-follows-link t)
|
|
|
|
(org-ellipsis " ▼")
|
|
|
|
(org-src-fontify-natively t)
|
|
|
|
(org-log-done 'time)
|
|
|
|
(org-agenda-custom-commands '(("t" "TODOs"
|
|
|
|
((agenda)
|
|
|
|
(alltodo)))))
|
|
|
|
(org-agenda-span 'day)
|
|
|
|
(org-agenda-todo-ignore-scheduled 'future)
|
|
|
|
(org-agenda-tags-todo-honor-ignore-options t)
|
2021-05-12 15:03:16 +00:00
|
|
|
(org-file-apps '(("log" . emacs)
|
|
|
|
(auto-mode . emacs)
|
|
|
|
(directory . emacs)
|
|
|
|
("\\.pdf\\'" . emacs)
|
|
|
|
("\\.mm\\'" . default)
|
|
|
|
("\\.x?html?\\'" . default)))
|
2021-02-23 16:09:07 +00:00
|
|
|
:general
|
|
|
|
(leader-map "oa" #'org-agenda)
|
2021-05-12 15:03:16 +00:00
|
|
|
(leader-map "oc" #'org-capture)
|
2021-07-27 15:50:12 +00:00
|
|
|
(leader-map "ol" #'org-store-link)
|
2021-05-12 15:03:16 +00:00
|
|
|
(normal org-mode-map "<return>" #'org-return))
|
2021-02-23 16:09:07 +00:00
|
|
|
|
|
|
|
(use-package evil-org
|
|
|
|
:after org
|
|
|
|
:hook ((org-mode . evil-org-mode)
|
|
|
|
(org-agenda-mode . (lambda ()
|
|
|
|
(require 'evil-org-agenda)
|
|
|
|
(evil-org-agenda-set-keys)))))
|
|
|
|
|
|
|
|
(use-package org-super-agenda
|
|
|
|
:after (org)
|
|
|
|
:defer 1
|
|
|
|
:config
|
|
|
|
(org-super-agenda-mode)
|
|
|
|
;; Nuke the header keybindings
|
|
|
|
(setq org-super-agenda-header-map (make-sparse-keymap))
|
|
|
|
:custom
|
2021-02-23 17:14:52 +00:00
|
|
|
(org-super-agenda-groups `((:name "In progress"
|
2021-02-23 16:09:07 +00:00
|
|
|
:todo "IN PROGRESS")
|
|
|
|
(:name "Lola"
|
|
|
|
:tag "@lola")
|
|
|
|
(:name "unifyDB"
|
|
|
|
:tag "@unifydb")
|
|
|
|
(:name "Personal"
|
2021-02-23 17:14:52 +00:00
|
|
|
:tag "@personal")
|
2021-02-25 00:53:35 +00:00
|
|
|
(:name "Jira" :file-path ,(expand-file-name "~/org/jira")))))
|
2021-02-23 16:09:07 +00:00
|
|
|
|
|
|
|
(use-package org-gcal
|
|
|
|
:commands (org-gcal-sync
|
|
|
|
org-gcal-fetch
|
|
|
|
org-gcal-post-at-point
|
|
|
|
org-gcal-delete-at-point
|
|
|
|
org-gcal-request-token)
|
|
|
|
:after (org evil-org)
|
|
|
|
:init
|
|
|
|
(defun org-agenda-redo-and-fetch-gcal (&optional all)
|
|
|
|
(interactive "P")
|
|
|
|
(let ((cb (if all #'org-agenda-redo-all #'org-agenda-redo)))
|
|
|
|
(deferred:nextc (org-gcal-fetch) cb)))
|
|
|
|
(advice-add 'evil-org-agenda-set-keys :after
|
|
|
|
(lambda ()
|
|
|
|
(general-def 'motion org-agenda-mode-map
|
|
|
|
"gR" #'org-agenda-redo-and-fetch-gcal)))
|
|
|
|
:config
|
|
|
|
(setq org-gcal-client-id (password-store-get "lola-org-gcal-client-id")
|
|
|
|
org-gcal-client-secret (password-store-get "lola-org-gcal-client-secret")
|
|
|
|
org-gcal-fetch-file-alist `(("jeremydormitzer@lola.com" .
|
|
|
|
,(expand-file-name "~/org/lola-gcal.org"))
|
|
|
|
("jeremy.dormitzer@gmail.com" .
|
|
|
|
,(expand-file-name "~/org/personal-gcal.org"))
|
|
|
|
("lut2o2moohg6qkdsto1qfq7th4@group.calendar.google.com" .
|
|
|
|
,(expand-file-name "~/org/j-n-gcal.org")))
|
|
|
|
org-gcal-notify-p nil))
|
|
|
|
|
2021-02-23 17:14:52 +00:00
|
|
|
(use-package org-jira
|
|
|
|
:after (org)
|
|
|
|
:init
|
|
|
|
(setq jiralib-url "https://lola.atlassian.net"
|
|
|
|
org-jira-working-dir (expand-file-name "~/org/jira")
|
|
|
|
org-jira-jira-status-to-org-keyword-alist '(("To Do" . "TODO")
|
|
|
|
("Blocked" . "BLOCKED")
|
|
|
|
("In Progress" . "IN PROGRESS")
|
|
|
|
("Code Review" . "IN PROGRESS")
|
|
|
|
("Awaiting Release" . "IN PROGRESS")
|
|
|
|
("Done" . "DONE")
|
|
|
|
("Won't Fix" . "CANCELLED")))
|
|
|
|
(add-to-list 'org-agenda-files org-jira-working-dir))
|
|
|
|
|
2021-02-25 00:53:27 +00:00
|
|
|
;; org-roam provides backlinks between org documents
|
|
|
|
(use-package org-roam
|
2021-10-05 15:09:05 +00:00
|
|
|
:hook ((org-mode . org-roam-db-autosync-mode))
|
2021-02-25 00:53:27 +00:00
|
|
|
:custom
|
|
|
|
(org-roam-directory "~/org")
|
2021-10-05 15:09:05 +00:00
|
|
|
(org-roam-list-files-commands '(rg find fd fdfind))
|
|
|
|
:init
|
|
|
|
(setq org-roam-v2-ack t)
|
|
|
|
(defvar org-roam-commands-map (make-sparse-keymap))
|
|
|
|
(general-def org-roam-commands-map
|
|
|
|
"l" #'org-roam-buffer-toggle
|
|
|
|
"f" #'org-roam-node-find
|
|
|
|
"i" #'org-roam-node-insert
|
|
|
|
"I" #'org-roam-node-insert-immediate)
|
|
|
|
(with-eval-after-load 'org
|
|
|
|
(general-def org-mode-map "C-c n" org-roam-commands-map)
|
|
|
|
(which-key-declare-prefixes-for-mode 'org-mode "C-c n" "org-roam"))
|
2021-02-25 00:53:27 +00:00
|
|
|
:general
|
2021-10-05 15:09:05 +00:00
|
|
|
(leader-map "of" #'org-roam-node-find)
|
2021-02-25 00:53:27 +00:00
|
|
|
:config
|
|
|
|
(general-def 'normal org-roam-backlinks-mode-map
|
|
|
|
"RET" #'org-open-at-point
|
|
|
|
"q" #'bury-buffer))
|
|
|
|
|
2021-02-23 16:09:07 +00:00
|
|
|
(provide 'init-org)
|