Remove annoying bug in Emacs config
- Author
- Maarten Vangeneugden
- Date
- July 24, 2024, 12:25 p.m.
- Hash
- 48eef49dff696152174234b34ea66a791f85ac48
- Parent
- b5b1d4e848b7aa0491a2f2619370925205d87198
- Modified file
- init.el
init.el ¶
2 additions and 3 deletions.
View changes Hide changes
1 |
1 |
;; Copyright © 2018-2022 Maarten Vangeneugden |
2 |
2 |
;; Author: Maarten Vangeneugden <contact_me@maartenv.be> |
3 |
3 |
;; URL: https://maartenv.be |
4 |
4 |
;; |
5 |
5 |
;; Welcome to Ghent Emacs. |
6 |
6 |
;; |
7 |
7 |
;; This is the configuration file for Ghent Emacs, a GNU Emacs derivative |
8 |
8 |
;; developed in the city of Ghent, Belgium, by a student of Engineering |
9 |
9 |
;; Informatics at Ghent University. |
10 |
10 |
;; |
11 |
11 |
;; License: GPLv3+ |
12 |
12 |
|
13 |
13 |
;; USAGE: |
14 |
14 |
;; This configuration file uses the use-package declaration, that means the |
15 |
15 |
;; settings are a bit different from what you'd normally do in a GNU Emacs |
16 |
16 |
;; init.el file. Consult https://github.com/jwiegley/use-package for info on how |
17 |
17 |
;; to correctly write package configuration. |
18 |
18 |
|
19 |
19 |
(eval-when-compile |
20 |
20 |
(require 'use-package)) |
21 |
21 |
;(require 'diminish) ;; if you use :diminish |
22 |
22 |
(require 'bind-key) ;; if you use any :bind variant |
23 |
23 |
|
24 |
24 |
(custom-set-variables |
25 |
25 |
;; custom-set-variables was added by Custom. |
26 |
26 |
;; If you edit it by hand, you could mess it up, so be careful. |
27 |
27 |
;; Your init file should contain only one such instance. |
28 |
28 |
;; If there is more than one, they won't work right. |
29 |
29 |
'(custom-safe-themes |
30 |
30 |
'("763bf89898a06b03f7b65fbc29857a1c292e4350246093702fdbd6c4e46e2cf0" "78e6be576f4a526d212d5f9a8798e5706990216e9be10174e3f3b015b8662e27" "d9646b131c4aa37f01f909fbdd5a9099389518eb68f25277ed19ba99adeb7279" "8b58ef2d23b6d164988a607ee153fd2fa35ee33efc394281b1028c2797ddeebb" "f9aede508e587fe21bcfc0a85e1ec7d27312d9587e686a6f5afdbb0d220eab50" "83ae405e25a0a81f2840bfe5daf481f74df0ddb687f317b5e005aa61261126e9" "c433c87bd4b64b8ba9890e8ed64597ea0f8eb0396f4c9a9e01bd20a04d15d358" "a24c5b3c12d147da6cef80938dca1223b7c7f70f2f382b26308eba014dc4833a" "732b807b0543855541743429c9979ebfb363e27ec91e82f463c91e68c772f6e3" "a2cde79e4cc8dc9a03e7d9a42fabf8928720d420034b66aecc5b665bbf05d4e9" "8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "bd7b7c5df1174796deefce5debc2d976b264585d51852c962362be83932873d9" default)) |
31 |
31 |
'(inhibit-startup-screen t) |
32 |
32 |
'(nil nil t) |
33 |
- | '(package-selected-packages |
34 |
33 |
'(company-fuzzy web-mode use-package undo-tree srefactor spacemacs-theme spaceline solarized-theme smooth-scrolling rainbow-delimiters pretty-mode page-break-lines monokai-theme helm general evil dashboard dante company-ycmd company-flx company-anaconda clang-format cider auto-package-update auctex a)) |
35 |
- | '(spaceline-inflation 1 t nil "Customized with use-package spaceline") |
+ |
34 |
'(spaceline-inflation 1 t nil "Customized with use-package spaceline") |
36 |
35 |
'(spaceline-toggle-buffer-size-off nil t nil "Customized with use-package spaceline")) |
37 |
36 |
;(custom-set-faces |
38 |
37 |
;; custom-set-faces was added by Custom. |
39 |
38 |
;; If you edit it by hand, you could mess it up, so be careful. |
40 |
39 |
;; Your init file should contain only one such instance. |
41 |
40 |
;; If there is more than one, they won't work right. |
42 |
41 |
;'(default ((((class color) (min-colors 89)) (:foreground "#ffffff" :background "#263238"))))) |
43 |
42 |
|
44 |
43 |
;; To get rid of those FUCKING ANNOYING BACKUP FILES FUCKING HELL DUDE |
45 |
44 |
(setq backup-directory-alist '(("." . "~/.emacs.d/backup")) |
46 |
45 |
backup-by-copying t ; Don't delink hardlinks |
47 |
46 |
version-control t ; Use version numbers on backups |
48 |
47 |
delete-old-versions t ; Automatically delete excess backups |
49 |
48 |
kept-new-versions 20 ; how many of the newest versions to keep |
50 |
49 |
kept-old-versions 5 ; and how many of the old |
51 |
50 |
) |
52 |
51 |
;; And yes I copied it from SO, suck it: https://stackoverflow.com/questions/2680389/how-to-remove-all-files-ending-with-made-by-emacs |
53 |
52 |
|
54 |
53 |
;; Disables the use of tabs, replaces them with spaces |
55 |
54 |
(setq-default indent-tabs-mode nil) |
56 |
55 |
|
57 |
56 |
;; Activate UTF-8 throughout Ghent Emacs |
58 |
57 |
(prefer-coding-system 'utf-8) |
59 |
58 |
(set-default-coding-systems 'utf-8) |
60 |
59 |
(set-terminal-coding-system 'utf-8) |
61 |
60 |
(set-keyboard-coding-system 'utf-8) |
62 |
61 |
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)) |
63 |
62 |
|
64 |
63 |
;; Line numbering config |
65 |
64 |
(global-display-line-numbers-mode) |
66 |
65 |
(setq display-line-numbers-mode t) |
67 |
66 |
(setq display-line-numbers-widen t) |
68 |
67 |
(setq display-line-numbers-type 'relative) |
69 |
68 |
(setq display-line-numbers-current-absolute t) |
70 |
69 |
|
71 |
70 |
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) |
72 |
71 |
(setq scroll-step 1) |
73 |
72 |
(setq scroll-margin 10) ;; Keeps 10 lines above and down always visible if still left |
74 |
73 |
|
75 |
74 |
;; Enable line breaks in all modes at column 80 |
76 |
75 |
(setq-default auto-fill-function 'do-auto-fill) |
77 |
76 |
(setq-default fill-column 80) |
78 |
77 |
|
79 |
78 |
(setq ring-bell-function 'ignore) ;; Disables the FUCKING ANNOYING BEEPS HOLY SHIT |
80 |
79 |
|
81 |
80 |
;; Setup packages |
82 |
81 |
;(package-initialize) |
83 |
82 |
(require 'package) |
84 |
83 |
(setq package-enable-at-startup nil) |
85 |
84 |
(add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/")) |
86 |
85 |
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) |
87 |
86 |
(unless (package-installed-p 'use-package) |
88 |
87 |
(package-refresh-contents) |
89 |
88 |
(package-install 'use-package)) |
90 |
89 |
|
91 |
90 |
|
92 |
91 |
|
93 |
92 |
|
94 |
93 |
;; Next two lines allow foregoing :ensure t on all packages |
95 |
94 |
;; :ensure t simply makes sure that, if a package isn't installed on this |
96 |
95 |
;; machine, it's automatically fetched and installed. |
97 |
96 |
;; This doesn't keep packages up-to-date, cfr. auto-package-update for that |
98 |
97 |
(require 'use-package-ensure) |
99 |
98 |
(setq use-package-always-ensure t) |
100 |
99 |
|
101 |
100 |
;; Package for automatic updating of all the other packages |
102 |
101 |
(use-package auto-package-update |
103 |
102 |
:config |
104 |
103 |
(setq auto-package-update-delete-old-versions t) |
105 |
104 |
(setq auto-package-update-hide-results t) |
106 |
105 |
(auto-package-update-maybe)) |
107 |
106 |
|
108 |
107 |
;; Easier keybindings so we can do more lazy loading |
109 |
108 |
(use-package general |
110 |
109 |
:config |
111 |
110 |
(general-create-definer my-leader-def |
112 |
111 |
;; :prefix my-leader |
113 |
112 |
:prefix "SPC") |
114 |
113 |
(general-create-definer local-leader-def |
115 |
114 |
;; :prefix local-leader |
116 |
115 |
:prefix ",")) |
117 |
116 |
|
118 |
117 |
(use-package dashboard |
119 |
118 |
:init |
120 |
119 |
(setq dashboard-banner-logo-title "") ; It's nicer to just not have a title text. |
121 |
120 |
(setq dashboard-startup-banner "~/ghent-emacs.png") |
122 |
121 |
:config |
123 |
122 |
(dashboard-setup-startup-hook)) |
124 |
123 |
|
125 |
124 |
;; AUCTeX configuration |
126 |
125 |
;; Partly inspired by https://piotr.is/2010/emacs-as-the-ultimate-latex-editor/ |
127 |
126 |
;;;;(use-package auctex |
128 |
127 |
;;:init |
129 |
128 |
;;(setq TeX-auto-save t) |
130 |
129 |
;;(setq TeX-parse-self t) |
131 |
130 |
;;(setq Tex-save-query nil) |
132 |
131 |
;;) |
133 |
132 |
|
134 |
133 |
;; Updates all packages automatically |
135 |
134 |
(use-package auto-package-update |
136 |
135 |
:config |
137 |
136 |
(setq auto-package-update-delete-old-versions t) |
138 |
137 |
(setq auto-package-update-hide-results t) |
139 |
138 |
(auto-package-update-maybe)) |
140 |
139 |
|
141 |
140 |
;; UI settings |
142 |
141 |
(tool-bar-mode -1) |
143 |
142 |
(menu-bar-mode -1) |
144 |
143 |
(toggle-scroll-bar -1) |
145 |
144 |
|
146 |
145 |
;; Tabs and width |
147 |
146 |
(setq-default tab-width 4) |
148 |
147 |
(setq-default c-basic-offset 4) |
149 |
148 |
|
150 |
149 |
(use-package spaceline |
151 |
150 |
:init |
152 |
151 |
(setq frame-char-height 35) |
153 |
152 |
(setq powerline-height 35) |
154 |
153 |
:custom |
155 |
154 |
(spaceline-toggle-buffer-size-off) |
156 |
155 |
;(setq powerline-height 21) |
157 |
156 |
(spaceline-inflation 1) |
158 |
157 |
(powerline-default-separator 'slant) |
159 |
158 |
:config |
160 |
159 |
(spaceline-spacemacs-theme) |
161 |
160 |
(setq spaceline-highlight-face-func 'spaceline-highlight-face-evil-state)) |
162 |
161 |
|
163 |
162 |
|
164 |
163 |
(use-package monokai-theme |
165 |
164 |
:config |
166 |
165 |
(load-theme 'monokai) |
167 |
- | (setq monokai-variable-pitch-mode t)) |
+ |
166 |
(setq monokai-variable-pitch-mode t)) |
168 |
167 |
;; When using solarized as theme, put in :config |
169 |
168 |
;; (setq x-underline-at-descent-line t) |
170 |
169 |
;; Which will block an ugly line being drawn trhough the modeline. |
171 |
170 |
|
172 |
171 |
;(add-hook 'org-mode-hook '(lambda () (setq fill-column 80))) |
173 |
172 |
;(add-hook 'org-mode-hook 'auto-fill-mode) |
174 |
173 |
;; (Programming) languages |
175 |
174 |
|
176 |
175 |
|
177 |
176 |
|
178 |
177 |
(use-package dante |
179 |
178 |
:after haskell-mode |
180 |
179 |
:commands 'dante-mode |
181 |
180 |
:init |
182 |
181 |
(add-hook 'haskell-mode-hook 'dante-mode) |
183 |
182 |
(add-hook 'haskell-mode-hook 'flycheck-mode)) |
184 |
183 |
|
185 |
184 |
|
186 |
185 |
;; HTML/CSS/Django |
187 |
186 |
(use-package web-mode |
188 |
187 |
:mode "\\.html?\\.djhtml\\'" |
189 |
188 |
:init |
190 |
189 |
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode)) |
191 |
190 |
(setq web-mode-markup-indent-offset 4) |
192 |
191 |
(setq web-mode-css-indent-offset 4) |
193 |
192 |
(setq web-mode-code-indent-offset 4) |
194 |
193 |
;(setq web-mode-engines-alist |
195 |
194 |
; '(("django" . "\\.html\\"))) ;; FIXME this doesn't work yet. IDK why. |
196 |
195 |
:custom ;; Next lines disable all the automatic completion stuff that I didn't explicitely ask for |
197 |
196 |
(web-mode-enable-auto-pairing nil) |
198 |
197 |
(web-mode-enable-auto-closing nil) |
199 |
198 |
(web-mode-enable-auto-expanding nil) |
200 |
199 |
(web-mode-enable-auto-opening nil) |
201 |
200 |
(web-mode-enable-auto-quoting nil)) |
202 |
201 |
|
203 |
202 |
|
204 |
203 |
;;(use-package ycmd-mode |
205 |
204 |
;;:ensure ycmd |
206 |
205 |
;;;:hook (after-init . global-ycmd-mode) |
207 |
206 |
;;:hook (haskell-mode elisp-mode python-mode c-mode c++-mode) ; Add the modes of the languages where YCM |
208 |
207 |
;;; needs to kick in |
209 |
208 |
;;:init |
210 |
209 |
;;; Old paths |
211 |
210 |
;;;(set-variable 'ycmd-server-command `("/usr/bin/python" ,(file-truename "/usr/share/vim/vimfiles/third_party/ycmd/ycmd/"))) |
212 |
211 |
;;;(set-variable 'ycmd-global-config "/home/simba/.emacs.d/lang/ycm_conf.py") |
213 |
212 |
;;(set-variable 'ycmd-server-command `("python" ,(file-truename "~/ycmd/ycmd"))) |
214 |
213 |
;;(set-variable 'ycmd-global-config (file-truename "~/Repositories/rc/.ycm_extra_conf.py")) |
215 |
214 |
;;(set-variable 'ycmd-global-modes 'all) ; Activates YCMD in 'all' major modes, |
216 |
215 |
;;; not only those in ycmd-file-type-map |
217 |
216 |
;;;(set-variable 'ycmd-extra-conf-whitelist '("/home/jorrit/Dev/*")) |
218 |
217 |
;;:config |
219 |
218 |
;;(setq url-show-status nil) ; Makes those FUCKING annoying messages SHUT THE HELL UP |
220 |
219 |
;;(setq request-message-level -1) |
221 |
220 |
|
222 |
221 |
;;(use-package flycheck-ycmd |
223 |
222 |
;;:ensure t |
224 |
223 |
;;:commands (flycheck-ycmd-setup) |
225 |
224 |
;;:hook (ycmd-mode . flycheck-ycmd-setup) |
226 |
225 |
;;:init |
227 |
226 |
;;(setq flycheck-clang-language-standard "c++11") |
228 |
227 |
;;(when (not (display-graphic-p)) |
229 |
228 |
;;(setq flycheck-indication-mode nil)))) |
230 |
229 |
|
231 |
230 |
(use-package company |
232 |
231 |
:hook (after-init . global-company-mode) |
233 |
232 |
:init |
234 |
233 |
(company-tng-configure-default) ; Use <TAB> to scroll in completion options |
235 |
234 |
(setq company-minimum-prefix-length 2) |
236 |
235 |
(setq company-idle-delay 0.0)) |
237 |
236 |
;:config |
238 |
237 |
;;(use-package company-ycmd-mode |
239 |
238 |
;;:ensure company-ycmd |
240 |
239 |
;;:commands (company-ycmd-setup) |
241 |
240 |
;;:hook (ycmd-mode . company-ycmd-setup)) |
242 |
241 |
;;(use-package company-flx |
243 |
242 |
;;:ensure t |
244 |
243 |
;;:config |
245 |
244 |
;;(company-flx-mode +1))) |
246 |
245 |
;; |
247 |
246 |
(use-package company-fuzzy |
248 |
247 |
:hook (company-mode . company-fuzzy-mode) |
249 |
248 |
:init |
250 |
249 |
(setq company-fuzzy-sorting-backend 'flx |
251 |
250 |
company-fuzzy-prefix-on-top nil |
252 |
251 |
company-fuzzy-history-backends '(company-yasnippet) |
253 |
252 |
company-fuzzy-trigger-symbols '("." "->" "<" "\"" "'" "@"))) |
254 |
253 |
|
255 |
254 |
(global-company-fuzzy-mode 1) |
256 |
255 |
|
257 |
256 |
(use-package clang-format |
258 |
257 |
:general |
259 |
258 |
(local-leader-def |
260 |
259 |
:states 'normal |
261 |
260 |
:modes '(c-mode-map c++-mode-map) |
262 |
261 |
"b" '(:ignore t :which-key "clang") |
263 |
262 |
"bf" 'clang-format-buffer) |
264 |
263 |
:init |
265 |
264 |
(setq-default clang-format-style "{BasedOnStyle: llvm, IndentWidth: 4}")) |
266 |
265 |
|
267 |
266 |
;; eViL-mode |
268 |
267 |
(use-package evil |
269 |
268 |
:hook (after-init . evil-mode) |
270 |
269 |
:bind (:map evil-normal-state-map ;; Scrolls over lines correctly |
271 |
270 |
("j" . evil-next-visual-line) |
272 |
271 |
("k" . evil-previous-visual-line)) |
273 |
272 |
:general |
274 |
273 |
(my-leader-def |
275 |
274 |
:states 'normal |
276 |
275 |
"b" '(:ignore t :which-key "buffer") |
277 |
276 |
"g" '(:ignore t :which-key "magit") |
278 |
277 |
"f" '(:ignore t :which-key "files") |
279 |
278 |
"bk" 'kill-this-buffer |
280 |
279 |
"bd" 'kill-other-buffers |
281 |
280 |
"bh" 'switch-to-home-buffer |
282 |
281 |
"br" 'revert-buffer |
283 |
282 |
"h" 'split-window-vertically |
284 |
283 |
"v" 'split-window-horizontally) |
285 |
284 |
(local-leader-def |
286 |
285 |
:states 'normal |
287 |
286 |
;; General lang options |
288 |
287 |
"c" 'compile) |
289 |
288 |
:init |
290 |
289 |
(setq evil-find-skip-newlines t) ;; Allows f/F/t/T to search beyond CR/LF |
291 |
290 |
(setq evil-set-undo-system 'undo-tree) ;; Sets EViL up to use undo (after a |
292 |
291 |
;; weird 2020 patch) |
293 |
292 |
(setq evil-want-C-u-scroll t)) ;; Activates c-u scroll to above. |
294 |
293 |
|
295 |
294 |
;; About smooth-scrolling: I'd normally just use some variables for scrolling |
296 |
295 |
;; but they all fail with org-mode. This package fixes everything that's wrong for me. |
297 |
296 |
(use-package smooth-scrolling |
298 |
297 |
:config |
299 |
298 |
(smooth-scrolling-mode 1)) |
300 |
299 |
|
301 |
300 |
(use-package org |
302 |
301 |
:pin "org" |
303 |
302 |
; FIXME This causes some errors with bind-keys or what have you. Commented |
304 |
303 |
; until it is fixed. |
305 |
304 |
;:bind (:bind-keymap |
306 |
305 |
; ("C-c x" . org-todo-state-map) |
307 |
306 |
; :map org-todo-state-map |
308 |
307 |
; ("x" . #'(lambda nil (interactive) (org-todo "CANCELLED"))) |
309 |
308 |
; ("d" . #'(lambda nil (interactive) (org-todo "DONE"))) |
310 |
309 |
; ("f" . #'(lambda nil (interactive) (org-todo "DEFERRED"))) |
311 |
310 |
; ("l" . #'(lambda nil (interactive) (org-todo "DELEGATED"))) |
312 |
311 |
; ("s" . #'(lambda nil (interactive) (org-todo "STARTED"))) |
313 |
312 |
; ("w" . #'(lambda nil (interactive) (org-todo "WAITING")))) |
314 |
313 |
; :map org-mode-map |
315 |
314 |
; ("C-c x" . org-todo-state-map)) |
316 |
315 |
:init |
317 |
316 |
(define-key mode-specific-map [?a] 'org-agenda) |
318 |
317 |
:custom |
319 |
318 |
;; Because I use XeLaTeX (it's objectively better), some variables need to be |
320 |
319 |
;; set so org-mode knows what to call. |
321 |
320 |
|
322 |
321 |
;; Okay, so you cán export asynchronous so compiling your PDF doesn't lock up |
323 |
322 |
;; the editor completely, but for one reason or another, you MUST set the |
324 |
323 |
;; async-debug to nil. Otherwise it will constantly "exit abnormally" without |
325 |
324 |
;; reason. This fixes it, who knows why. |
326 |
325 |
(org-export-async-debug nil) |
327 |
326 |
|
328 |
327 |
(org-latex-compiler 'xelatex) ; Makes sure the XeLaTeX compiler is used |
329 |
328 |
|
330 |
329 |
; Tells Org to use dvisvgm because dvipng does not support XeLaTeX's output format |
331 |
330 |
(org-preview-latex-default-process 'dvisvgm) |
332 |
331 |
|
333 |
332 |
; This edits the preview process so it works correctly with XeLaTeX. |
334 |
333 |
; Changes: |
335 |
334 |
; - "latex" to "xelatex" |
336 |
335 |
; - Added the "-no-pdf" flag so it prints an XDV file instead of PDF. |
337 |
336 |
; - change input type from dvi to xdv |
338 |
337 |
; - Only leave the dvisvgm option because I don't need the others |
339 |
338 |
(org-preview-latex-process-alist |
340 |
339 |
(quote |
341 |
340 |
((dvisvgm :programs |
342 |
341 |
("xelatex" "dvisvgm") |
343 |
342 |
:description "dvi > svg" :message "you need to install the programs: xelatex and dvisvgm." :use-xcolor t :image-input-type "xdv" :image-output-type "svg" :image-size-adjust |
344 |
343 |
(1.7 . 1.5) |
345 |
344 |
:latex-compiler |
346 |
345 |
("xelatex -interaction nonstopmode -no-pdf -output-directory %o %f") |
347 |
346 |
:image-converter |
348 |
347 |
("dvisvgm %f -n -b min -c %S -o %O"))))) |
349 |
348 |
|
350 |
349 |
;; Sets the formatting options. I only changed :scale to 1.6, but I don't know |
351 |
350 |
;; how to change only thát, so for now I'm configuring the entire variable |
352 |
351 |
(org-format-latex-options (quote |
353 |
352 |
(:foreground default :background default :scale 1.6 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers |
354 |
353 |
("begin" "$1" "$" "$$" "\\(" "\\[")))) |
355 |
354 |
|
356 |
355 |
;; Sets the directory in which the preview fragments are stored to the /tmp |
357 |
356 |
;; folder. Otherwise it clutters up the folder in which the source resides |
358 |
357 |
;; with what are essentially cache files. |
359 |
358 |
(org-preview-latex-image-directory "/tmp/ltximg/") |
360 |
359 |
|
361 |
360 |
;; Following customizations are in regard to org-agenda configuration. |
362 |
361 |
(org-agenda-files (quote ("~/shared/planning/planning.org"))) |
363 |
362 |
(org-default-notes-file "~/shared/planning/notes.org") |
364 |
363 |
(org-agenda-span 62) |
365 |
364 |
(org-deadline-warning-days 14) |
366 |
365 |
(org-agenda-show-all-dates t) |
367 |
366 |
(org-agenda-skip-deadline-if-done t) |
368 |
367 |
(org-agenda-skip-scheduled-if-done t) |
369 |
368 |
(org-agenda-start-on-weekday nil) |
370 |
369 |
(org-reverse-note-order t) |
371 |
370 |
(org-fast-tag-selection-single-key (quote expert)) |
372 |
371 |
(org-agenda-custom-commands |
373 |
372 |
(quote (("d" todo "DELEGATED" nil) |
374 |
373 |
("c" todo "DONE|DEFERRED|CANCELED" nil) |
375 |
374 |
("w" todo "WAITING" nil) |
376 |
375 |
("W" agenda "" ((org-agenda-ndays 21))) |
377 |
376 |
("A" agenda "" |
378 |
377 |
((org-agenda-skip-function |
379 |
378 |
(lambda nil |
380 |
379 |
(org-agenda-skip-entry-if (quote notregexp) "\\=.*\\[#A\\]"))) |
381 |
380 |
(org-agenda-ndays 1) |
382 |
381 |
(org-agenda-overriding-header "Today's Priority #A tasks: "))) |
383 |
382 |
("u" alltodo "" |
384 |
383 |
((org-agenda-skip-function |
385 |
384 |
(lambda nil |
386 |
385 |
(org-agenda-skip-entry-if (quote scheduled) (quote deadline) |
387 |
386 |
(quote regexp) "\n]+>"))) |
388 |
387 |
(org-agenda-overriding-header "Unscheduled TODO entries: ")))))) |
389 |
388 |
(org-capture-store-without-prompt t) |
390 |
389 |
(org-capture-templates |
391 |
390 |
(quote ((116 "* TODO %?\n %u" "~/Repositories/private/org/planning.org" "Tasks") |
392 |
391 |
(110 "* %u %?" "~/Repositories/private/org/notes.org" "Notes")))) |
393 |
392 |
(capture-annotation-functions (quote (org-capture-annotation))) |
394 |
393 |
(capture-handler-functions (quote (org-capture-handler)))) |
395 |
394 |
|
396 |
395 |
;:general |
397 |
396 |
;(local-leader-def |
398 |
397 |
; :states 'normal |
399 |
398 |
; :keymaps 'org-mode-map |
400 |
399 |
; "e" 'org-export-dispatch |
401 |
400 |
; "x" 'org-table-export |
402 |
401 |
; "." 'org-time-stamp |
403 |
402 |
; "t" 'org-twbs-export-to-html |
404 |
403 |
; "s" 'org-schedule |
405 |
404 |
; "d" 'org-deadline |
406 |
405 |
; "'" 'org-edit-special) |
407 |
406 |
; :config |
408 |
407 |
; ;; log todo items with timestamp |
409 |
408 |
; (setq org-log-done 'time)) |
410 |
409 |
|
411 |
410 |
(use-package helm |
412 |
411 |
:hook (after-init . helm-mode) |
413 |
412 |
:commands (helm-autoresize-mode) |
414 |
413 |
:init |
415 |
414 |
;; (defvar helm-google-suggest-use-curl-p) |
416 |
415 |
(defvar helm-ff-search-library-in-sexp) |
417 |
416 |
(defvar helm-echo-input-in-header-line) |
418 |
417 |
(defvar helm-ff-file-name-history-use-recentf) |
419 |
418 |
:general |
420 |
419 |
(general-define-key |
421 |
420 |
"M-x" 'helm-M-x |
422 |
421 |
"M-:" 'helm-eval-expression |
423 |
422 |
"C-c h" 'helm-command-prefix) |
424 |
423 |
(general-define-key |
425 |
424 |
:keymaps 'helm-map |
426 |
425 |
"<tab>" 'helm-execute-persistent-action |
427 |
426 |
"C-i" 'helm-execute-persistent-action |
428 |
427 |
"C-z" 'helm-select-action) |
429 |
428 |
(my-leader-def |
430 |
429 |
:states 'normal |
431 |
430 |
"bb" 'helm-buffers-list |
432 |
431 |
"ff" 'helm-find-files |
433 |
432 |
"p" 'helm-show-kill-ring) |
434 |
433 |
:config |
435 |
434 |
(setq helm-split-window-inside-p t ; open helm buffer inside current window, not occupy whole other window |
436 |
435 |
helm-move-to-line-cycle-in-source t ; move to end or beginning of source when reaching top or bottom of source. |
437 |
436 |
helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp. |
438 |
437 |
helm-scroll-amount 8 ; scroll 8 lines other window using m-<next>/m-<prior> |
439 |
438 |
helm-ff-file-name-history-use-recentf t |
440 |
439 |
helm-echo-input-in-header-line t) |
441 |
440 |
|
442 |
441 |
;; hide some autogenerated files from helm |
443 |
442 |
(setq helm-ff-skip-boring-files t) |
444 |
443 |
;; (add-to-list 'helm-boring-file-regexp-list "\\~$") |
445 |
444 |
|
446 |
445 |
(setq helm-autoresize-max-height 0) |
447 |
446 |
(setq helm-autoresize-min-height 20) |
448 |
447 |
(helm-autoresize-mode 1)) |
449 |
448 |
|
450 |
449 |
|
451 |
450 |
(use-package rainbow-delimiters |
452 |
451 |
:hook (prog-mode . rainbow-delimiters-mode)) |
453 |
452 |
|
454 |
453 |
|
455 |
454 |
;; Settings for having an LaTeX beamer class export tool |
456 |
455 |
(unless (boundp 'org-export-latex-classes) |
457 |
456 |
(setq org-export-latex-classes nil)) |
458 |
457 |
(add-to-list 'org-export-latex-classes |
459 |
458 |
;; beamer class, for presentations |
460 |
459 |
'("beamer" |
461 |
460 |
"\\documentclass[11pt]{beamer}\n |
462 |
461 |
\\mode<{{{beamermode}}}>\n |
463 |
462 |
\\usetheme{{{{beamertheme}}}}\n |
464 |
463 |
\\usecolortheme{{{{beamercolortheme}}}}\n |
465 |
464 |
\\beamertemplateballitem\n |
466 |
465 |
\\setbeameroption{show notes} |
467 |
466 |
\\usepackage[utf8]{inputenc}\n |
468 |
467 |
\\usepackage[T1]{fontenc}\n |
469 |
468 |
\\usepackage{hyperref}\n |
470 |
469 |
\\usepackage{color} |
471 |
470 |
\\usepackage{listings} |
472 |
471 |
\\lstset{numbers=none,language=[ISO]C++,tabsize=4, |
473 |
472 |
frame=single, |
474 |
473 |
basicstyle=\\small, |
475 |
474 |
showspaces=false,showstringspaces=false, |
476 |
475 |
showtabs=false, |
477 |
476 |
keywordstyle=\\color{blue}\\bfseries, |
478 |
477 |
commentstyle=\\color{red}, |
479 |
478 |
}\n |
480 |
479 |
\\usepackage{verbatim}\n |
481 |
480 |
\\institute{{{{beamerinstitute}}}}\n |
482 |
481 |
\\subject{{{{beamersubject}}}}\n" |
483 |
482 |
|
484 |
483 |
("\\section{%s}" . "\\section*{%s}") |
485 |
484 |
|
486 |
485 |
("\\begin{frame}[fragile]\\frametitle{%s}" |
487 |
486 |
"\\end{frame}" |
488 |
487 |
"\\begin{frame}[fragile]\\frametitle{%s}" |
489 |
488 |
"\\end{frame}"))) |
490 |
489 |
|
491 |
490 |
;; Adds a letter class, for formal letters |
492 |
491 |
|
493 |
492 |
(add-to-list 'org-export-latex-classes |
494 |
493 |
|
495 |
494 |
'("letter" |
496 |
495 |
"\\documentclass[11pt]{letter}\n |
497 |
496 |
\\usepackage[utf8]{inputenc}\n |
498 |
497 |
\\usepackage[T1]{fontenc}\n |
499 |
498 |
\\usepackage{color}" |
500 |
499 |
|
501 |
500 |
("\\section{%s}" . "\\section*{%s}") |
502 |
501 |
("\\subsection{%s}" . "\\subsection*{%s}") |
503 |
502 |
("\\subsubsection{%s}" . "\\subsubsection*{%s}") |
504 |
503 |
("\\paragraph{%s}" . "\\paragraph*{%s}") |
505 |
504 |
("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) |
506 |
505 |
|
507 |
506 |
|
508 |
507 |
(custom-set-faces |
509 |
508 |
;; custom-set-faces was added by Custom. |
510 |
509 |
;; If you edit it by hand, you could mess it up, so be careful. |
511 |
510 |
;; Your init file should contain only one such instance. |
512 |
511 |
;; If there is more than one, they won't work right. |
513 |
512 |
) |
514 |
513 |
|
515 |
514 |
|
516 |
515 |
;; This is to fix the retarded scrolling behaviour in Emacs as much as possible: |
517 |
516 |
(setq redisplay-dont-pause t |
518 |
517 |
scroll-margin 1 |
519 |
518 |
scroll-step 1 |
520 |
519 |
scroll-conservatively 10000 |
521 |
520 |
scroll-preserve-screen-position 1) |
522 |
521 |
;; Stops Emacs from accelerating my scroll: |
523 |
522 |
(setq mouse-wheel-progressive-speed nil) |
524 |
523 |
;; Makes scrolling do 5 lines at a time, otherwise it's pretty slow |
525 |
524 |
(setq mouse-wheel-scroll-amount '(5)) |
526 |
525 |