blob: 8f8db712d97722321d6a767e9a345f4d893d94e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
;;; 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. Run
;; M-x describe-variable RET org-todo-keywords RET
;; for documentation on how these keywords work.
(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")))
;; An agenda view lets you see your TODO items filtered and
;; formatted in different ways. You can have multiple agenda views;
;; please see the org-mode documentation for more information.
(setq org-agenda-custom-commands
'(("n" "Agenda and All Todos"
((agenda)
(todo)))
("w" "Work" agenda ""
((org-agenda-files '("work.org")))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Phase 3: extensions
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; TODO
|