-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_dot_emacs
162 lines (123 loc) · 4.77 KB
/
_dot_emacs
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
;; -*- mode: elisp -*-
;; Disable the splash screen (to enable it agin, replace the t with 0)
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(require 'package)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/"))
(setq package-enable-at-startup nil)
(package-initialize)
(add-to-list 'load-path "/home/.emacs.d/evil")
(require 'evil)
(evil-mode 1)
(setq inhibit-splash-screen t)
;; Enable transient mark mode
(transient-mark-mode 1)
(add-hook 'text-mode-hook 'turn-on-visual-line-mode)
;;;;Org mode configuration
;; Enable Org mode
(require 'org)
;; Make Org mode work with files ending in .org
;; (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
;; The above is the default in recent emacsen
(setq org-todo-keywords
'((sequence "TODO" "IN-PROGRESS" "WAITING" "MOVED" "SCHEDULED" "|" "DONE" "CANCELLED")))
(setq org-todo-keyword-faces
'(("TODO" . "red")
("IN-PROGRESS" . "magenta")
("WAITING" . "yellow")
("MOVED" . "blue")
("SCHEDULED" ."white")
("DONE" . "green")
("CANCELLED" . "black")
))
(global-set-key "\C-ca" 'org-agenda)
;;(setq org-log-done 'time)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
(define-key global-map "\C-cc" 'org-capture)
;; Capture templates for: TODO tasks, Notes, appointments, phone calls, meetings, and org-protocol
(setq org-capture-templates
(quote
(
("p" "projects")
("pf" "Project1")
("pfl" "Project11" entry (file+datetree "~/workspace/scheme/project11.org") "** %U - %^{Activity} :LOG:\n")
)
)
)
(setq org-agenda-span 10
org-agenda-start-on-weekday nil
org-agenda-start-day "-2d")
;;(custom-set-variables
;; ;; custom-set-variables was added by Custom.
;; ;; If you edit it by hand, you could mess it up, so be careful.
;; ;; Your init file should contain only one such instance.
;; ;; If there is more than one, they won't work right.
;; '(org-agenda-files
;; (quote
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(org-level-1 ((t (:background "yellow" :foreground "black"))))
'(org-level-2 ((t (:foreground "white")))))
;; Add all files in a folder to ajenda
(setq org-agenda-files '("~/workspace/scheme/"))
;; open ajenda without split if no other window is open
(defun air-pop-to-org-agenda (split)
"Visit the org agenda, in the current window or a SPLIT."
(interactive "P")
(org-agenda-list)
(when (not split)
(delete-other-windows)))
(define-key global-map (kbd "C-c t a") 'air-pop-to-org-agenda)
;; insert bkank line before headings
(setq org-blank-before-new-entry (quote ((heading) (plain-list-item))))
;; enfore dependencies between child and parent todo
(setq org-enforce-todo-dependencies t)
;; Refresh ajenda with time.
(defun renewOrgBuffer ()
(interactive)
(dolist (buffer (buffer-list))
(with-current-buffer buffer
(when (derived-mode-p 'org-agenda-mode)
(org-agenda-maybe-redo))))
)
(run-with-idle-timer 3 1000 #'renewOrgBuffer)
(setq org-tags-column 50)
;; Save all tempfiles in $TMPDIR/emacs$UID/
(defconst emacs-tmp-dir (expand-file-name (format "emacs%d" (user-uid)) temporary-file-directory))
(setq backup-directory-alist
`((".*" . ,emacs-tmp-dir)))
(setq auto-save-file-name-transforms
`((".*" ,emacs-tmp-dir t)))
(setq auto-save-list-file-prefix
emacs-tmp-dir)
;; line wrap column
;;(add-hook 'text-mode-hook (lambda() (refill-mode 1)))
(add-hook 'text-mode-hook 'turn-on-auto-fill)
;; 55 as column width
(add-hook 'text-mode-hook '(lambda() (set-fill-column 40)))
;; full justification by default
(add-hook 'text-mode-hook (lambda() (setq default-justification 'full)))
;;;; open ajenda when emacs opens
;;
;;(org-agenda nil "n")
;; Hide leading stars
(setq org-hide-leading-stars t)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages (quote (evil-visual-mark-mode))))
(load-theme 'manoj-dark)