diff options
Diffstat (limited to 'lisp/init-org.el')
-rw-r--r-- | lisp/init-org.el | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el new file mode 100644 index 0000000..d2d5e77 --- /dev/null +++ b/lisp/init-org.el | |||
@@ -0,0 +1,144 @@ | |||
1 | ;;; init-org.el -*- lexical-binding: t; -*- | ||
2 | |||
3 | (use-package org | ||
4 | :defer t | ||
5 | :custom | ||
6 | (org-adapt-indentation nil) | ||
7 | (org-auto-align-tags t) | ||
8 | (org-archive-mark-done t) | ||
9 | (org-fold-catch-invisible-edits 'show-and-error) | ||
10 | (org-clock-clocked-in-display 'mode-line) | ||
11 | (org-clock-string-limit 7) ; just the clock bit | ||
12 | |||
13 | (org-clock-persist nil) | ||
14 | (org-confirm-babel-evaluate nil) | ||
15 | (org-cycle-separator-lines 0) | ||
16 | (org-directory (sync/ "org/" t)) | ||
17 | (org-fontify-done-headline t) | ||
18 | (org-fontify-quote-and-verse-blocks t) | ||
19 | (org-fontify-whole-heading-line t) | ||
20 | (org-hide-emphasis-markers t) | ||
21 | (org-html-coding-system 'utf-8-unix) | ||
22 | (org-image-actual-width (list (* (window-font-width) | ||
23 | (- fill-column 8)))) | ||
24 | (org-imenu-depth 3) | ||
25 | (org-indent-indentation-per-level 0) | ||
26 | (org-indent-mode-turns-on-hiding-stars nil) | ||
27 | (org-insert-heading-respect-content t) | ||
28 | (org-list-demote-modify-bullet '(("-" . "+") | ||
29 | ("+" . "-"))) | ||
30 | (org-log-done 'time) | ||
31 | (org-log-into-drawer t) | ||
32 | (org-num-skip-commented t) | ||
33 | (org-num-skip-unnumbered t) | ||
34 | (org-num-skip-footnotes t) | ||
35 | (org-outline-path-complete-in-steps nil) | ||
36 | (org-pretty-entities t) | ||
37 | (org-pretty-entities-include-sub-superscripts nil) | ||
38 | (org-refile-targets '((nil . (:maxlevel . 2)) | ||
39 | (org-agenda-files . (:maxlevel . 1)))) | ||
40 | (org-refile-use-outline-path 'file) | ||
41 | (org-special-ctrl-a/e t) | ||
42 | (org-special-ctrl-k t) | ||
43 | (org-src-fontify-natively t) | ||
44 | (org-src-tab-acts-natively t) | ||
45 | (org-src-window-setup 'current-window) | ||
46 | (org-startup-truncated nil) | ||
47 | (org-startup-with-inline-images t) | ||
48 | (org-tags-column 0) | ||
49 | (org-todo-keywords | ||
50 | '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)" | ||
51 | "|" "DONE(d!)" "ASSIGNED(a@/!)") | ||
52 | (sequence "|" "CANCELED(k@)") | ||
53 | (sequence "MEETING(m)"))) | ||
54 | (org-use-speed-commands t) | ||
55 | :config | ||
56 | (require '+org) | ||
57 | (defkeys org-mode-map | ||
58 | "C-M-k" #'kill-paragraph | ||
59 | "C-M-t" #'transpose-paragraphs | ||
60 | "RET" #'+org-return-dwim | ||
61 | "S-<return>" #'+org-table-copy-down|+org-return-dwim | ||
62 | "C-c C-o" #'+org-open-at-point-dwim) | ||
63 | (setc org-ellipsis | ||
64 | (or (bound-and-true-p truncate-string-ellipsis) "…") | ||
65 | org-emphasis-alist | ||
66 | '(("*" org-bold) | ||
67 | ("/" org-italic) | ||
68 | ("_" org-underline) | ||
69 | ("=" org-verbatim) | ||
70 | ("~" org-code) | ||
71 | ("+" org-strikethrough))) | ||
72 | (defhook org-mode-hook | ||
73 | #'variable-pitch-mode | ||
74 | #'visual-fill-column-mode | ||
75 | #'turn-off-auto-fill | ||
76 | #'org-indent-mode | ||
77 | #'prettify-symbols-mode | ||
78 | #'abbrev-mode | ||
79 | (defhook ((before-save-hook nil :local)) | ||
80 | :name before-save@org-mode | ||
81 | (+org-hide-drawers-except-point) | ||
82 | (org-align-tags 'all)))) | ||
83 | |||
84 | (use-package org-agenda | ||
85 | :custom | ||
86 | (org-agenda-skip-deadline-if-done t) | ||
87 | (org-agenda-skip-scheduled-if-done t) | ||
88 | (org-agenda-span 10) | ||
89 | (org-agenda-block-separator ?─) | ||
90 | (org-agenda-time-grid | ||
91 | '((daily today require-timed) | ||
92 | (800 1000 1200 1400 1600 1800 2000) | ||
93 | " ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")) | ||
94 | (org-agenda-current-time-string | ||
95 | "← now ─────────────────────────────────────────────────") | ||
96 | (org-agenda-include-diary nil) ; I use the org-diary features | ||
97 | |||
98 | (org-agenda-todo-ignore-deadlines 'near) | ||
99 | (org-agenda-todo-ignore-scheduled 'future) | ||
100 | (org-agenda-include-deadlines t) | ||
101 | (org-deadline-warning-days 0) | ||
102 | (org-agenda-show-future-repeats 'next) | ||
103 | (org-agenda-window-setup 'current-window) | ||
104 | (org-agenda-file-skip-regexp "sync-conflict") | ||
105 | :bind (("C-c a" . org-agenda)) | ||
106 | :config | ||
107 | (require '+org) | ||
108 | (advice-add 'org-agenda-files :filter-return #'org-agenda-files@skip-regexp) | ||
109 | (defhook org-agenda-mode-hook | ||
110 | (setq-local truncate-lines t) | ||
111 | #'hl-line-mode) | ||
112 | (defhook org-agenda-after-show-hook | ||
113 | #'org-narrow-to-subtree)) | ||
114 | |||
115 | (use-package org-capture | ||
116 | :bind | ||
117 | (("C-c c" . org-capture))) | ||
118 | |||
119 | (use-package ol ; org-link | ||
120 | :after org | ||
121 | :config | ||
122 | (require '+org) | ||
123 | (+org-link-define-type sms (number _)) | ||
124 | (+org-link-define-type tel (number _))) | ||
125 | |||
126 | (use-package ox ; org-export | ||
127 | :defer t | ||
128 | :custom | ||
129 | (org-export-coding-system 'utf-8-unix) | ||
130 | (org-export-headline-levels 8) | ||
131 | (org-export-with-drawers nil) | ||
132 | (org-export-with-section-numbers nil) | ||
133 | (org-export-with-smart-quotes t) | ||
134 | (org-export-with-sub-superscripts t) | ||
135 | (org-export-with-toc nil) | ||
136 | :config | ||
137 | (require 'ox-md)) | ||
138 | |||
139 | (use-package org-word-count | ||
140 | :load-path "~/src/emacs/org-word-count/" | ||
141 | :hook org-mode-hook) | ||
142 | |||
143 | (provide 'init-org) | ||
144 | ;;; init-org.el ends here | ||