aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshton Wiersdorf <ashton.wiersdorf@pobox.com>2023-01-10 16:09:31 -0700
committerAshton Wiersdorf <ashton.wiersdorf@pobox.com>2023-01-10 16:09:31 -0700
commit61504d92179f5f1940b25667a644d1f6fbc24838 (patch)
treea37bd15570d0f79c79b2a6b97924166390493ada
parente832dd622150f69c986b44ed477a6c0cd1411ed4 (diff)
Bunch of work on the org mixin
-rw-r--r--mixins/org.el65
1 files changed, 64 insertions, 1 deletions
diff --git a/mixins/org.el b/mixins/org.el
index a31b6fe..9966f04 100644
--- a/mixins/org.el
+++ b/mixins/org.el
@@ -88,6 +88,15 @@
:bind (:map global-map
("C-c l s" . org-store-link) ; Mnemonic: link → store
("C-c l i" . org-insert-link-global)) ; Mnemonic: link → insert
+ :config
+ (require 'oc-csl) ; citation support
+ (add-to-list 'org-export-backends 'md)
+
+ ;; Make org-open-at-point follow file links in the same window
+ (setf (cdr (assoc 'file org-link-frame-setup)) 'find-file)
+
+ ;; Make exporting quotes better
+ (setq org-export-with-smart-quotes t)
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -96,10 +105,64 @@
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Yes, you can have multiple use-package declarations. It's best if their
+;; configs don't overlap. Once you've reached Phase 2, I'd recommend merging the
+;; config from Phase 1. I've broken it up here for the sake of clarity.
+(use-package org
+ :config
+ ;; Instead of just two states (TODO, DONE) we set up a few different states
+ ;; that a task can be in.
+ (setq org-todo-keywords
+ '((sequence "TODO(t)" "WAITING(w@/!)" "STARTED(s!)" "|" "DONE(d!)" "OBSOLETE(o@)")))
+
+ ;; Refile configuration
+ (setq org-outline-path-complete-in-steps nil)
+ (setq org-refile-use-outline-path 'file)
+
+ (setq org-capture-templates
+ '(("c" "Default Capture" entry (file "inbox.org")
+ "* TODO %?\n%U\n%i")
+ ;; Capture and keep an org-link to the thing we're currently working with
+ ("r" "Capture with Reference" entry (file "inbox.org")
+ "* TODO %?\n%U\n%i\n%a")
+ ;; Define a section
+ ("w" "Work")
+ ("wm" "Work meeting" entry (file+headline "work.org" "Meetings")
+ "** TODO %?\n%U\n%i\n%a")
+ ("wr" "Work report" entry (file+headline "work.org" "Reports")
+ "** TODO %?\n%U\n%i\n%a")))
+
+ (setq org-agenda-custom-commands
+ '(("n" "Agenda and All Todos"
+ ((agenda)
+ (todo)))
+ ("w" "Work" agenda ""
+ ((org-agenda-files '("work.org")))))))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Phase 3: extensions (org-roam, etc.)
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
+(use-package org-roam
+ :ensure t
+ :config
+ (org-roam-db-autosync-mode)
+ ;; Dedicated side window for backlinks
+ (add-to-list 'display-buffer-alist
+ '("\\*org-roam\\*"
+ (display-buffer-in-side-window)
+ (side . right)
+ (window-width . 0.4)
+ (window-height . fit-window-to-buffer))))
+
+;; Pretty web interface for org-roam
+;(use-package org-roam-ui
+; :ensure t
+; :after org-roam
+; :config
+; (setq org-roam-ui-sync-theme t
+; org-roam-ui-follow t
+; org-roam-ui-update-on-save t
+; org-roam-ui-open-on-start t))