From f4f88ea6ac2affdac4246b9e6a6a4ec3fdeb92f5 Mon Sep 17 00:00:00 2001
From: Ashton Wiersdorf <mail@wiersdorf.dev>
Date: Fri, 8 Sep 2023 09:39:55 -0600
Subject: Rename mixin → extra
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 extras/org.el | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 176 insertions(+)
 create mode 100644 extras/org.el

(limited to 'extras/org.el')

diff --git a/extras/org.el b/extras/org.el
new file mode 100644
index 0000000..307528b
--- /dev/null
+++ b/extras/org.el
@@ -0,0 +1,176 @@
+;;; Emacs Bedrock
+;;;
+;;; Extra config: Org-mode starter config
+
+;;; Usage: Append or require this file from init.el for some software
+;;; development-focused packages.
+;;;
+;;; Org-mode is a fantastically powerful package. It does a lot of things, which
+;;; makes it a little difficult to understand at first.
+;;;
+;;; We will configure Org-mode in phases. Work with each phase as you are
+;;; comfortable.
+;;;
+;;; YOU NEED TO CONFIGURE SOME VARIABLES! The most important variable is the
+;;; `org-directory', which tells org-mode where to look to find your agenda
+;;; files.
+
+;;; See "org-intro.txt" for a high-level overview.
+
+;;; Contents:
+;;;
+;;;  - Critical variables
+;;;  - Phase 1: editing and exporting files
+;;;  - Phase 2: todos, agenda generation, and task tracking
+;;;  - Phase 3: extensions (org-roam, etc.)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;;   Critical variables
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; These variables need to be set for Org-mode's full power to be unlocked!
+;;;
+;;; You can read the documentation for any variable with `C-h v'. If you have
+;;; Consult configured (see the `base.el' file) then it should help you find
+;;; what you're looking for.
+
+;;; Phase 1 variables
+
+;;; Phase 2 variables
+
+;; Agenda variables
+(setq org-directory "~/Documents/org/") ; Non-absolute paths for agenda and
+                                        ; capture templates will look here.
+
+(setq org-agenda-files '("inbox.org" "work.org"))
+
+;; Default tags
+(setq org-tag-alist '(
+                      ;; locale
+                      (:startgroup)
+                      ("home" . ?h)
+                      ("work" . ?w)
+                      ("school" . ?s)
+                      (:endgroup)
+                      (:newline)
+                      ;; scale
+                      (:startgroup)
+                      ("one-shot" . ?o)
+                      ("project" . ?j)
+                      ("tiny" . ?t)
+                      (:endgroup)
+                      ;; misc
+                      ("meta")
+                      ("review")
+                      ("reading")))
+
+;; Org-refile: where should org-refile look?
+(setq org-refile-targets 'FIXME)
+
+;;; Phase 3 variables
+
+;; Org-roam variables
+(setq org-roam-directory "~/Documents/org-roam/")
+(setq org-roam-index-file "~/Documents/org-roam/index.org")
+
+;;; Optional variables
+
+;; Advanced: Custom link types
+;; This example is for linking a person's 7-character ID to their page on the
+;; free genealogy website Family Search.
+(setq org-link-abbrev-alist
+      '(("family_search" . "https://www.familysearch.org/tree/person/details/%s")))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;;   Phase 1: editing and exporting files
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(use-package org
+  :hook ((org-mode . visual-line-mode)  ; wrap lines at word breaks
+         (org-mode . flyspell-mode))    ; spell checking!
+
+  :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)
+  )
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;
+;;;   Phase 2: todos, agenda generation, and task tracking
+;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; 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))
-- 
cgit v1.2.3