summary refs log tree commit diff stats
path: root/lisp/init-org.el
blob: d2d5e77a55ef6be71d00da8a09be4c1b504ab386 (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
;;; init-org.el  -*- lexical-binding: t; -*-

(use-package org
  :defer t
  :custom
  (org-adapt-indentation nil)
  (org-auto-align-tags t)
  (org-archive-mark-done t)
  (org-fold-catch-invisible-edits 'show-and-error)
  (org-clock-clocked-in-display 'mode-line)
  (org-clock-string-limit 7)     ; just the clock bit

  (org-clock-persist nil)
  (org-confirm-babel-evaluate nil)
  (org-cycle-separator-lines 0)
  (org-directory (sync/ "org/" t))
  (org-fontify-done-headline t)
  (org-fontify-quote-and-verse-blocks t)
  (org-fontify-whole-heading-line t)
  (org-hide-emphasis-markers t)
  (org-html-coding-system 'utf-8-unix)
  (org-image-actual-width (list (* (window-font-width)
                                   (- fill-column 8))))
  (org-imenu-depth 3)
  (org-indent-indentation-per-level 0)
  (org-indent-mode-turns-on-hiding-stars nil)
  (org-insert-heading-respect-content t)
  (org-list-demote-modify-bullet '(("-" . "+")
                                   ("+" . "-")))
  (org-log-done 'time)
  (org-log-into-drawer t)
  (org-num-skip-commented t)
  (org-num-skip-unnumbered t)
  (org-num-skip-footnotes t)
  (org-outline-path-complete-in-steps nil)
  (org-pretty-entities t)
  (org-pretty-entities-include-sub-superscripts nil)
  (org-refile-targets '((nil . (:maxlevel . 2))
                        (org-agenda-files . (:maxlevel . 1))))
  (org-refile-use-outline-path 'file)
  (org-special-ctrl-a/e t)
  (org-special-ctrl-k t)
  (org-src-fontify-natively t)
  (org-src-tab-acts-natively t)
  (org-src-window-setup 'current-window)
  (org-startup-truncated nil)
  (org-startup-with-inline-images t)
  (org-tags-column 0)
  (org-todo-keywords
   '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)"
               "|" "DONE(d!)" "ASSIGNED(a@/!)")
     (sequence "|" "CANCELED(k@)")
     (sequence "MEETING(m)")))
  (org-use-speed-commands t)
  :config
  (require '+org)
  (defkeys org-mode-map
    "C-M-k" #'kill-paragraph
    "C-M-t" #'transpose-paragraphs
    "RET" #'+org-return-dwim
    "S-<return>" #'+org-table-copy-down|+org-return-dwim
    "C-c C-o" #'+org-open-at-point-dwim)
  (setc org-ellipsis
        (or (bound-and-true-p truncate-string-ellipsis) "…")
        org-emphasis-alist
        '(("*" org-bold)
          ("/" org-italic)
          ("_" org-underline)
          ("=" org-verbatim)
          ("~" org-code)
          ("+" org-strikethrough)))
  (defhook org-mode-hook
    #'variable-pitch-mode
    #'visual-fill-column-mode
    #'turn-off-auto-fill
    #'org-indent-mode
    #'prettify-symbols-mode
    #'abbrev-mode
    (defhook ((before-save-hook nil :local))
      :name before-save@org-mode
      (+org-hide-drawers-except-point)
      (org-align-tags 'all))))

(use-package org-agenda
  :custom
  (org-agenda-skip-deadline-if-done t)
  (org-agenda-skip-scheduled-if-done t)
  (org-agenda-span 10)
  (org-agenda-block-separator ?─)
  (org-agenda-time-grid
   '((daily today require-timed)
     (800 1000 1200 1400 1600 1800 2000)
     " ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄"))
  (org-agenda-current-time-string
   "← now ─────────────────────────────────────────────────")
  (org-agenda-include-diary nil) ; I use the org-diary features

  (org-agenda-todo-ignore-deadlines 'near)
  (org-agenda-todo-ignore-scheduled 'future)
  (org-agenda-include-deadlines t)
  (org-deadline-warning-days 0)
  (org-agenda-show-future-repeats 'next)
  (org-agenda-window-setup 'current-window)
  (org-agenda-file-skip-regexp "sync-conflict")
  :bind (("C-c a" . org-agenda))
  :config
  (require '+org)
  (advice-add 'org-agenda-files :filter-return #'org-agenda-files@skip-regexp)
  (defhook org-agenda-mode-hook
    (setq-local truncate-lines t)
    #'hl-line-mode)
  (defhook org-agenda-after-show-hook
    #'org-narrow-to-subtree))

(use-package org-capture
  :bind
  (("C-c c" . org-capture)))

(use-package ol                                ; org-link
  :after org
  :config
  (require '+org)
  (+org-link-define-type sms (number _))
  (+org-link-define-type tel (number _)))

(use-package ox                                ; org-export
  :defer t
  :custom
  (org-export-coding-system 'utf-8-unix)
  (org-export-headline-levels 8)
  (org-export-with-drawers nil)
  (org-export-with-section-numbers nil)
  (org-export-with-smart-quotes t)
  (org-export-with-sub-superscripts t)
  (org-export-with-toc nil)
  :config
  (require 'ox-md))

(use-package org-word-count
  :load-path "~/src/emacs/org-word-count/"
  :hook org-mode-hook)

(provide 'init-org)
;;; init-org.el ends here