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