-
Notifications
You must be signed in to change notification settings - Fork 0
/
org-defaults.el
111 lines (90 loc) · 4.6 KB
/
org-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
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
(setq org-confirm-babel-evaluate (not org-confirm-babel-evaluate))
(setq python-shell-prompt-detect-failure-warning nil)
(setq org-directory "~/Dropbox/Muistettavaa")
;;; display/update images in the buffer after I evaluate
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
;; Set the babel languages
(org-babel-do-load-languages
'org-babel-load-languages
'((R . t)
(shell . t)
(ipython . t)))
;; This makes org remote blocks work at least on Euler
(defun org-babel-temp-file (prefix &optional suffix)
"Create a temporary file in the `org-babel-temporary-directory'.
Passes PREFIX and SUFFIX directly to `make-temp-file' with the
value of `temporary-file-directory' temporarily set to the value
of `org-babel-temporary-directory'."
(if (file-remote-p default-directory)
(let ((prefix
;; We cannot use `temporary-file-directory' as local part
;; on the remote host, because it might be another OS
;; there. So we assume "/tmp", which ought to exist on
;; relevant architectures.
(concat (file-remote-p default-directory)
;; REPLACE temporary-file-directory with /tmp:
(expand-file-name prefix "/tmp/"))))
(make-temp-file prefix nil suffix))
(let ((temporary-file-directory
(or (and (boundp 'org-babel-temporary-directory)
(file-exists-p org-babel-temporary-directory)
org-babel-temporary-directory)
temporary-file-directory)))
(make-temp-file prefix nil suffix))))
(setq org-agenda-files '("~/Dropbox/Muistettavaa/todo.org"
"~/Dropbox/Muistettavaa/inbox.org"
"~/Dropbox/Muistettavaa/gtd.org"
"~/Dropbox/Muistettavaa/notes.org"
"~/Dropbox/Muistettavaa/someday.org"
"~/Dropbox/Muistettavaa/tickler.org"))
(setq org-agenda-custom-commands
'(("c" "Simple agenda view"
((tags "PRIORITY=\"A\""
((org-agenda-skip-function '(org-agenda-skip-entry-if 'todo 'done))
(org-agenda-overriding-header "High-priority unfinished tasks:")))
(agenda "")
(alltodo "")))))
(setq org-capture-templates
'(("t" "todo" entry (file+headline "~/Dropbox/Muistettavaa/todo.org" "To do")
"* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n")
("T" "Tickler" entry (file+headline "~/Dropbox/Muistettavaa/tickler.org" "Tickler")
"* %i%? \n %U")
("n" "Note" entry (file+headline "~/Dropbox/Muistettavaa/notes.org" "Notes")
"* %i%? \n %U")
("c" "Capture" entry (file+headline "~/Dropbox/Muistettavaa/todo.org" "To do")
"* TODO %?\n%i\nEntered on %U\n %a")))
(setq org-use-fast-todo-selection t)
(setq org-todo-state-tags-triggers
(quote (("CANCELLED" ("CANCELLED" . t))
("WAITING" ("WAITING" . t))
("HOLD" ("WAITING") ("HOLD" . t))
(done ("WAITING") ("HOLD"))
("TODO" ("WAITING") ("CANCELLED") ("HOLD"))
("NEXT" ("WAITING") ("CANCELLED") ("HOLD"))
("DONE" ("WAITING") ("CANCELLED") ("HOLD")))))
(setq org-todo-keywords '((sequence "☛ TODO(t)" "✔ DONE(d)" "⚑ WAITING(w)" "|" "✘ CANCELED(c)")))
;; (setq org-todo-keywords
;; (quote ((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d)")
;; (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" "PHONE" "MEETING"))))
(setq org-todo-keyword-faces
(quote (("☛ TODO" :foreground "red" :weight bold)
("✔ DONE" :foreground "forest green" :weight bold)
("WAITING" :foreground "orange" :weight bold)
("HOLD" :foreground "magenta" :weight bold)
("CANCELLED" :foreground "forest green" :weight bold)
("MEETING" :foreground "forest green" :weight bold)
("PHONE" :foreground "forest green" :weight bold))))
(setq org-refile-targets '(("~/Dropbox/Muistettavaa/gtd.org" :maxlevel . 4)
("~/Dropbox/Muistettavaa/notes.org" :level . 1)
("~/Dropbox/Muistettavaa/someday.org" :level . 2)
("~/Dropbox/Muistettavaa/tickler.org" :maxlevel . 3)))
(add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
(setq org-edit-src-content-indentation 0)
(add-hook 'org-mode-hook
'poly-org-mode)
(add-hook 'org-mode-hook
'org-bullets-mode)
(add-hook 'org-mode-hook
'org-indent-mode)
(provide 'org-default)
;;; org-defaults.el ends here