summary refs log tree commit diff
path: root/emacs.d/custom/fcuny-org.el
blob: e967e7f195f21c565a224db34c075c5c44aff412 (plain) (blame)
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
(require 'fcuny-vars)

(use-package org
  :ensure t

  :hook ((org-mode . visual-line-mode)
         (org-mode . org-indent-mode))

  :bind (("C-c c" . org-capture)
         ("C-c a" . org-agenda))

  :custom
  ;; priorities. I use:
  ;; -1 important + urgent
  ;; -2 important + non-urgent
  ;; -3 non-important + urgent
  ;; -4 non-important + non-urgent
  (org-highest-priority ?1)
  (org-default-priority ?4)
  (org-lowest-priority ?4)

  (org-pretty-entities t)

  (org-startup-indented t)
  (org-directory (expand-file-name "~/Documents/notebooks"))
  (org-default-notes-file (concat org-directory "/inbox.org"))
  (org-agenda-start-on-weekday 1)
  (org-tags-column -120)

  ;; I want to follow links on RET
  (org-return-follows-link t)
  (org-blank-before-new-entry (quote ((heading . nil)
				      (plain-list-item . nil))))

  ;; A few abbreviations I use regularly
  (org-link-abbrev-alist
   '(("src"  . "~/workspace/%s")
     ("jira" . "https://jira.twitter.biz/browse/%s")
     ("ph"   . "https://phabricator.twitter.biz/%s")
     ("go"   . "http://go/%s")))

  ;; The sequence I want to use to navigate tasks
  (org-todo-keywords
   '((sequence "TODO(t)" "NEXT(n)" "STARTED(s)" "|" "DONE(d)" "CANCELED(c)")))

  (org-enforce-todo-dependencies t)

  ;; list of files to use for the agenda
  (org-agenda-files (list (expand-file-name "personal/tasks.org" org-directory)
                          (expand-file-name "personal/projects.org" org-directory)
                          (expand-file-name "twitter/tasks.org" org-directory)
                          (expand-file-name "twitter/projects.org" org-directory)
                          (expand-file-name "twitter/people.org" org-directory)
                          (expand-file-name "twitter/meetings.org" org-directory)))

  ;; for the agenda, I want to see tasks in order of priorities.
  (org-agenda-custom-commands
   '(("c" "Agenda by priorities"
      ((tags-todo "PRIORITY=\"1\""
                  ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
                   (org-agenda-overriding-header "important and urgent:")))
       (tags-todo "PRIORITY=\"2\""
                  ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
                   (org-agenda-overriding-header "important and non-urgent:")))
       (tags-todo "PRIORITY=\"3\""
                  ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
                   (org-agenda-overriding-header "non-important and urgent:")))
       (agenda "" ((org-agenda-ndays 1)))
       (alltodo "" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done)))))
      ((org-agenda-compact-blocks t)))))

  (org-capture-templates
   `(;; templates for general references, links, etc. They can be relevant for both work and personal learning.
     ("b" "Bookmark" entry
      (file+headline ,(concat org-directory "/notes.org") "Bookmark")
      "* TODO %^{LINK}\n%?\n:PROPERTIES:\n:CREATED: %U\n:END:\n"
      :empty-lines 1)
     ("r" "Reference" entry
      (file+headline ,(concat org-directory "/notes.org") "Reference")
      "* %^{TITLE}\n%?\n:PROPERTIES:\n:CREATED: %U\n:END:\n"
      :empty-lines 1)
     ("e" "Event" entry
      (file+headline ,(concat org-directory "/notes.org") "Event")
      "* %^{EVENT}\n%?\n:PROPERTIES:\n:CREATED: %U\n:END:\n"
      :empty-lines 1)

     ;; templates for personal things only.
     ("t" "Personal Todo" entry
      (file+headline ,(concat org-directory "/personal/tasks.org") "New")
      "* TODO %?\n")
     ("j" "Personal Journal" entry
      (file+olp+datetree ,(concat org-directory "/personal/journal.org"))
      "* %U %?\n"
      :empty-lines 1 :tree-type week)

     ;; personal weekly review
     ("w" "Weekly Review" entry
      (file+olp+datetree ,(concat org-directory "/personal/reviews.org"))
      (file ,(concat fcuny/path-emacs-etc "/weekly_review.org"))
      :tree-type week)

     ;; templates for work related things only.
     ("T" "Work Todo" entry
      (file+headline ,(concat org-directory "/twitter/tasks.org") "New")
      "* TODO %?\n")
     ("J" "Work Journal" entry
      (file+olp+datetree ,(concat org-directory "/twitter/journal.org"))
      "* %U %?\n"
      :empty-lines 1 :tree-type week)
     ("M" "Meeting" entry
      (file+olp+datetree ,(concat org-directory "/twitter/meetings.org"))
      "* %U %^{TITLE}\n%?\n"
      :empty-lines 1)

     ;; refile!
     ("I" "Inbox, refile later" entry
      (file ,(concat org-directory "/inbox.org"))
      "\n* %?\n:PROPERTIES:\n:CREATED: %U\n:END:\n"
      :empty-lines 1))))

(use-package htmlize
  :ensure t)

(provide 'fcuny-org)