-
Notifications
You must be signed in to change notification settings - Fork 0
/
org-mode-defaults.el
32 lines (29 loc) · 1.32 KB
/
org-mode-defaults.el
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
;; from https://blog.aaronbieber.com/2016/09/24/an-agenda-for-life-with-org-mode.html
(defun my-org-skip-subtree-if-priority (priority)
"Skip an agenda subtree if it has a priority of PRIORITY.
PRIORITY may be one of the characters ?A, ?B, or ?C."
(let ((subtree-end (save-excursion (org-end-of-subtree t)))
(pri-value (* 1000 (- org-lowest-priority priority)))
(pri-current (org-get-priority (thing-at-point 'line t))))
(if (= pri-value pri-current)
subtree-end
nil)))
(setq org-agenda-custom-commands
'(("c" "Simple agenda view"
((agenda "" ((org-agenda-span 7))
(org-agenda-overriding-header "Today:"))
(tags "PRIORITY=\"A\""
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
(org-agenda-overriding-header ">>> HIGH <<<")))
(alltodo ""
((org-agenda-skip-function
'(or (my-org-skip-subtree-if-priority ?A)
(org-agenda-skip-if nil '(scheduled deadline))))
(org-agenda-overriding-header ">>> NORMAL <<<"))))
)))
(custom-set-variables
'(org-agenda-files '("~/thoughts/"))
'(org-agenda-follow-mode t)
'(org-clock-persist 'history)
'(org-default-notes-file '"~/thoughts/daily.org")
'(org-log-done 'note))