summaryrefslogtreecommitdiff
path: root/lisp/init-org.el
blob: e41a1707245d0ab5accd89084fe70fce517abea9 (about) (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
(provide 'my/init-org)
(eval-after-load "org"
  '(progn
     (setq org-ellipsis "⤵")
     (setq org-src-fontify-natively t)

     (global-set-key (kbd "C-c o l") 'org-store-link)
     (global-set-key (kbd "C-c o a") 'org-agenda)

     ;; TODO: make these available in org-mode only
     (global-set-key (kbd "C-c o s") 'org-schedule)
     (global-set-key (kbd "C-c o c") 'org-capture)

     (setq org-log-done t)
     (setq org-return-follows-link t)

     (setq org-directory "~/Documents/org")
     (setq org-agenda-files (mapcar (lambda (x) (concat org-directory x))
                                    (list "/master.org"
                                          "/work.org"
                                          "/study.org"
                                          "/home.org")))
     (setq org-default-notes-file (concat org-directory "/notes.org"))

     (setq org-agenda-custom-commands
           '(("w" todo "WAITING" nil)
             ("n" todo "NEXT" nil)
             ("d" "Agenda + Next Actions" ((agenda) (todo "NEXT")))))

     (defun my/modify-org-done-face ()
       (setq org-fontify-done-headline t)
       (set-face-attribute 'org-done nil :strike-through t)
       (set-face-attribute 'org-headline-done nil
                           :strike-through t
                           :foreground "light gray"))

     (require 'org-bullets)
     (add-hook 'org-add-hook 'my/modify-org-done-face)
     (add-hook 'org-mode-hook
               (lambda ()
                 (org-bullets-mode 1)

                 ;; render with variable pitch font (with a few exceptions)
                 (variable-pitch-mode 1)
                 (dolist (face '(org-block-begin-line
                                 org-block-end-line
                                 org-verbatim
                                 org-block-background))
                   (set-face-attribute face nil :inherit 'fixed-pitch))))

     (defun gtd ()
       (interactive)
       (find-file (concat org-directory "/master.org")))))

(require 'org)