commit | author | age
|
990949
|
1 |
#+TITLE: My Emacs configuration
|
0ba1ff
|
2 |
# LocalWords: poppler mingw emacs eq nt gnuplot setenv mapconcat el cond minibuffer pdf color Smartparens smartparens yas aindent whitespace eldoc ielm ibuffer hippie pscp pos Spaceline spaceline powerline spacemacs seperator dir Yasnippet yasnippet flycheck magit fullscreen CEDET askifnotset semanticdb EDE ede gdb srefactor analyzer eval cdb autosetup ghostscript math unicode reftex bibtex TeXcount texcount str latin rkt PlantUML plantuml autoload alist matlab verilog ds vh src fontify natively fortran dvipng plist xcolor EXWM Zenburn setq zenburn defun dolist init config DejaVu ispell aspell flyspell kbd recentf sexp ov bg listp defadvice progn prog keyfreq autosave dabbrev hl gc linum linux utf RET ARG arg configs backends contribs AucTex tex auctex LaTeX url htmlize linter backend writegood ggtags gtags dired eshell asm cd dwim VHDL defvar ctags vhdl concat sp html awk defalias cedet mips IPython ein contrib pandoc dokuwiki EMMS MPD emms toc favicon href css stylesheet async dataLayer gtag js UA sitelinks br Github postamble isso center disqus onclick Disqus javascript dsq createElement getElementsByTagName xml urlset xmlns curr loc
|
8a38cc
|
3 |
|
bf794a
|
4 |
* COMMENT Windows dependencies
|
80d515
|
5 |
Dependencies needed for Aspell, poppler PDF-tools, compilers and ghost-script provided by mingw64 in windows.
|
990949
|
6 |
#+BEGIN_SRC emacs-lisp
|
C |
7 |
(when (eq system-type 'windows-nt)
|
|
8 |
(add-to-list 'exec-path "C:/msys64/usr/bin")
|
|
9 |
(add-to-list 'exec-path "C:/msys64/mingw64/bin")
|
|
10 |
(add-to-list 'exec-path "c:/Program Files/gnuplot")
|
|
11 |
(setenv "PATH" (mapconcat #'identity exec-path path-separator)))
|
|
12 |
#+END_SRC
|
|
13 |
|
|
14 |
* Aesthetic changes
|
0fcc09
|
15 |
** Emacs theme
|
80d515
|
16 |
Theme switcher, using a cond allows loading of many preconfigured themes which can be switched between easily.
|
JG |
17 |
Zenburn theme is my default.
|
990949
|
18 |
#+BEGIN_SRC emacs-lisp
|
0fcc09
|
19 |
(setq emacs-theme 'zenburn)
|
80d515
|
20 |
|
JG |
21 |
(defun disable-all-themes ()
|
|
22 |
(dolist (i custom-enabled-themes)
|
|
23 |
(disable-theme i)))
|
412080
|
24 |
|
0fcc09
|
25 |
(cond ((eq emacs-theme 'zenburn)
|
C |
26 |
(use-package zenburn-theme
|
|
27 |
:ensure t
|
412080
|
28 |
:init
|
C |
29 |
(disable-all-themes)
|
0fcc09
|
30 |
:config
|
C |
31 |
(load-theme 'zenburn t)))
|
|
32 |
((eq emacs-theme 'doom-one)
|
|
33 |
(use-package doom-themes
|
|
34 |
:ensure t
|
412080
|
35 |
:init
|
C |
36 |
(disable-all-themes)
|
0fcc09
|
37 |
:config
|
C |
38 |
(setq doom-themes-enable-bolt t
|
|
39 |
doom-themes-enable-italic t)
|
|
40 |
(load-theme 'doom-one t)
|
|
41 |
(doom-themes-visual-bell-config)
|
412080
|
42 |
(doom-themes-org-config)))
|
C |
43 |
((eq emacs-theme 'none)
|
80d515
|
44 |
(disable-all-themes)))
|
990949
|
45 |
#+END_SRC
|
8a38cc
|
46 |
|
990949
|
47 |
** Default font
|
80d515
|
48 |
Set default font and faces.
|
20e001
|
49 |
#+BEGIN_SRC emacs-lisp
|
be9cff
|
50 |
;; (set-frame-font "DejaVu Sans Mono" nil t)
|
20e001
|
51 |
(set-frame-font "Dank Mono-11" nil t)
|
be9cff
|
52 |
;; (set-frame-font "Source Code Pro-10" nil t)
|
20e001
|
53 |
(set-face-italic 'font-lock-comment-face t)
|
C |
54 |
(set-face-italic 'font-lock-keyword-face t)
|
990949
|
55 |
#+END_SRC
|
8a38cc
|
56 |
|
990949
|
57 |
** Remove menu bar, toolbar, but keep scroll bar
|
80d515
|
58 |
Make the emacs interface slightly nicer.
|
990949
|
59 |
#+BEGIN_SRC emacs-lisp
|
C |
60 |
(menu-bar-mode 0)
|
|
61 |
(tool-bar-mode 0)
|
|
62 |
(scroll-bar-mode 1)
|
|
63 |
#+END_SRC
|
|
64 |
|
|
65 |
* Writing requirements
|
|
66 |
** Spellchecking
|
80d515
|
67 |
Use aspell for spellchecking.
|
JG |
68 |
Auto-enable in latex and org as they're the main writing modes.
|
990949
|
69 |
#+BEGIN_SRC emacs-lisp
|
C |
70 |
(require 'ispell)
|
|
71 |
(setq-default ispell-program-name "aspell")
|
|
72 |
(setq-default ispell-local-dictionary "en_AU")
|
|
73 |
(add-hook 'latex-mode-hook 'flyspell-mode)
|
0ba1ff
|
74 |
;; (add-hook 'latex-mode-hook 'flyspell-buffer)
|
990949
|
75 |
(add-hook 'org-mode-hook 'flyspell-mode)
|
0ba1ff
|
76 |
;; (add-hook 'org-mode-hook 'flyspell-buffer)
|
990949
|
77 |
#+END_SRC
|
C |
78 |
|
|
79 |
** Switch-window
|
80d515
|
80 |
Helps to change windows easily when many are open at once.
|
990949
|
81 |
#+BEGIN_SRC emacs-lisp
|
C |
82 |
(use-package switch-window
|
|
83 |
:ensure t
|
|
84 |
:config
|
|
85 |
(setq switch-window-input-style 'minibuffer)
|
|
86 |
(setq switch-window-increase 4)
|
|
87 |
(setq switch-window-threshold 2)
|
|
88 |
(setq switch-window-shortcut-style 'qwerty)
|
|
89 |
(setq switch-window-qwerty-shortcuts
|
|
90 |
'("a" "s" "d" "f" "j" "k" "l" "i" "o"))
|
|
91 |
:bind
|
|
92 |
([remap other-window] . switch-window))
|
|
93 |
#+END_SRC
|
8a38cc
|
94 |
|
990949
|
95 |
** Go to new window when opened
|
80d515
|
96 |
Go to new window when its opened instead of staying with current one.
|
990949
|
97 |
#+BEGIN_SRC emacs-lisp
|
C |
98 |
(defun split-and-follow-horizontally ()
|
|
99 |
(interactive)
|
|
100 |
(split-window-below)
|
|
101 |
(balance-windows)
|
|
102 |
(other-window 1))
|
|
103 |
(global-set-key (kbd "C-x 2") 'split-and-follow-horizontally)
|
|
104 |
|
|
105 |
(defun split-and-follow-vertically ()
|
|
106 |
(interactive)
|
|
107 |
(split-window-right)
|
|
108 |
(balance-windows)
|
|
109 |
(other-window 1))
|
|
110 |
(global-set-key (kbd "C-x 3") 'split-and-follow-vertically)
|
|
111 |
#+END_SRC
|
8a38cc
|
112 |
|
990949
|
113 |
** PDF-tools
|
80d515
|
114 |
Helpful pdf viewer.
|
990949
|
115 |
#+BEGIN_SRC emacs-lisp
|
bf794a
|
116 |
(use-package pdf-tools
|
JG |
117 |
:ensure t
|
|
118 |
:config
|
|
119 |
(pdf-tools-install 1))
|
990949
|
120 |
#+END_SRC
|
8a38cc
|
121 |
|
be9cff
|
122 |
** COMMENT Writegood-mode
|
80d515
|
123 |
Supposedly should provide insight to writing quality.
|
49aa9f
|
124 |
#+BEGIN_SRC emacs-lisp
|
JG |
125 |
(use-package writegood-mode
|
|
126 |
:ensure t
|
|
127 |
:hook (text-mode . writegood-mode))
|
|
128 |
#+END_SRC
|
|
129 |
|
990949
|
130 |
* Helm and Projectile
|
C |
131 |
** Helm core
|
80d515
|
132 |
Helm aids the user interface for emacs. Adds visual and auto-complete feedback for emacs commands.
|
990949
|
133 |
#+BEGIN_SRC emacs-lisp
|
C |
134 |
(use-package helm-config
|
|
135 |
:ensure helm
|
|
136 |
:bind (("M-x" . helm-M-x)
|
|
137 |
("C-x C-f" . helm-find-files)
|
|
138 |
("M-y" . helm-show-kill-ring)
|
|
139 |
("C-x b" . helm-mini)
|
|
140 |
("C-c h o" . helm-occur))
|
|
141 |
:config
|
|
142 |
(setq helm-M-x-fuzzy-match t)
|
|
143 |
(setq helm-buffers-fuzzy-matching t
|
|
144 |
helm-recentf-fuzzy-match t)
|
|
145 |
(setq helm-split-window-in-side-p t ; open helm buffer inside current window, not occupy whole other window
|
|
146 |
helm-move-to-line-cycle-in-source t ; move to end or beginning of source when reaching top or bottom of source.
|
|
147 |
helm-ff-search-library-in-sexp t ; search for library in `require' and `declare-function' sexp.
|
|
148 |
helm-scroll-amount 8 ; scroll 8 lines other window using M-<next>/M-<prior>
|
|
149 |
helm-ff-file-name-history-use-recentf t
|
|
150 |
helm-echo-input-in-header-line t)
|
|
151 |
(defun spacemacs//helm-hide-minibuffer-maybe ()
|
|
152 |
"Hide minibuffer in Helm session if we use the header line as input field."
|
|
153 |
(when (with-helm-buffer helm-echo-input-in-header-line)
|
|
154 |
(let ((ov (make-overlay (point-min) (point-max) nil nil t)))
|
|
155 |
(overlay-put ov 'window (selected-window))
|
|
156 |
(overlay-put ov 'face
|
|
157 |
(let ((bg-color (face-background 'default nil)))
|
|
158 |
`(:background ,bg-color :foreground ,bg-color)))
|
|
159 |
(setq-local cursor-type nil))))
|
|
160 |
(add-hook 'helm-minibuffer-set-up-hook
|
|
161 |
'spacemacs//helm-hide-minibuffer-maybe)
|
|
162 |
(helm-mode 1))
|
|
163 |
#+END_SRC
|
8a38cc
|
164 |
|
990949
|
165 |
** Projectile
|
80d515
|
166 |
Projectile is project management framework for emacs.
|
JG |
167 |
Helps in navigation and management of projects.
|
|
168 |
Identifies project layout from git.
|
990949
|
169 |
*** Enable it
|
C |
170 |
#+BEGIN_SRC emacs-lisp
|
|
171 |
(use-package projectile
|
|
172 |
:ensure t
|
|
173 |
:bind ("C-c p" . projectile-command-map)
|
|
174 |
:diminish projectile-mode
|
|
175 |
:config
|
|
176 |
(projectile-global-mode)
|
|
177 |
(setq projectile-completion-system 'helm)
|
|
178 |
(when (eq system-type 'windows-nt)
|
|
179 |
(setq projectile-indexing-method 'alien)))
|
|
180 |
#+END_SRC
|
8a38cc
|
181 |
|
990949
|
182 |
*** Let it compile things
|
80d515
|
183 |
Shortcut for compilation.
|
990949
|
184 |
#+BEGIN_SRC emacs-lisp
|
C |
185 |
(global-set-key (kbd "<f5>") 'projectile-compile-project)
|
|
186 |
#+END_SRC
|
8a38cc
|
187 |
|
990949
|
188 |
*** Enable communication with helm
|
80d515
|
189 |
Use helm to manage project.
|
990949
|
190 |
#+BEGIN_SRC emacs-lisp
|
baf326
|
191 |
(use-package helm-projectile
|
C |
192 |
:ensure t
|
|
193 |
:config
|
|
194 |
(helm-projectile-on))
|
990949
|
195 |
#+END_SRC
|
8a38cc
|
196 |
|
be9cff
|
197 |
** COMMENT ggtags
|
0ba1ff
|
198 |
Use GNU Global Tags. Can be useful for large projects.
|
bf794a
|
199 |
#+BEGIN_SRC emacs-lisp
|
JG |
200 |
(use-package ggtags
|
|
201 |
:ensure t
|
|
202 |
:bind (("C-c g s" . ggtags-find-other-symbol)
|
|
203 |
("C-c g h" . ggtags-view-tag-history)
|
|
204 |
("C-c g r" . ggtags-find-reference)
|
|
205 |
("C-c g f" . ggtags-find-file)
|
|
206 |
("C-c g c" . ggtags-create-tags)
|
|
207 |
("C-c g u" . ggtags-update-tags))
|
|
208 |
:config
|
|
209 |
(add-hook 'c-mode-common-hook
|
|
210 |
(lambda ()
|
|
211 |
(when (derived-mode-p 'c-mode 'c++-mode 'java-mode)
|
|
212 |
(ggtags-mode 1))))
|
|
213 |
)
|
|
214 |
|
|
215 |
(setq
|
|
216 |
helm-gtags-ignore-case t
|
|
217 |
helm-gtags-auto-update t
|
|
218 |
helm-gtags-use-input-at-cursor t
|
|
219 |
helm-gtags-pulse-at-cursor t
|
|
220 |
helm-gtags-prefix-key "\C-c g"
|
|
221 |
helm-gtags-suggested-key-mapping t
|
|
222 |
)
|
|
223 |
|
|
224 |
(use-package helm-gtags
|
|
225 |
:ensure t
|
|
226 |
:config
|
|
227 |
(add-hook 'dired-mode-hook 'helm-gtags-mode)
|
|
228 |
(add-hook 'eshell-mode-hook 'helm-gtags-mode)
|
|
229 |
(add-hook 'c-mode-hook 'helm-gtags-mode)
|
|
230 |
(add-hook 'c++-mode-hook 'helm-gtags-mode)
|
|
231 |
(add-hook 'asm-mode-hook 'helm-gtags-mode)
|
|
232 |
|
|
233 |
(define-key helm-gtags-mode-map (kbd "C-c g a") 'helm-gtags-tags-in-this-function)
|
|
234 |
(define-key helm-gtags-mode-map (kbd "C-j") 'helm-gtags-select)
|
|
235 |
(define-key helm-gtags-mode-map (kbd "M-.") 'helm-gtags-dwim)
|
|
236 |
(define-key helm-gtags-mode-map (kbd "M-,") 'helm-gtags-pop-stack)
|
|
237 |
(define-key helm-gtags-mode-map (kbd "C-c <") 'helm-gtags-previous-history)
|
|
238 |
(define-key helm-gtags-mode-map (kbd "C-c >") 'helm-gtags-next-history))
|
|
239 |
#+END_SRC
|
|
240 |
|
be9cff
|
241 |
** COMMENT Ctags
|
0ba1ff
|
242 |
Ctags is an older tagging program that supports more languages.
|
JG |
243 |
Currently setup for VHDL as I had to work with a large existing VHDL code-base.
|
bf794a
|
244 |
#+BEGIN_SRC emacs-lisp
|
JG |
245 |
(defvar ctags-command "ctags -e -R --languages=vhdl")
|
|
246 |
|
|
247 |
(defun ctags ()
|
|
248 |
(call-process-shell-command ctags-command nil "*Ctags*"))
|
|
249 |
|
|
250 |
|
|
251 |
(defun ctags-find-tags-file ()
|
|
252 |
"Recursively searches each parent directory for a file named
|
|
253 |
TAGS and returns the path to that file or nil if a tags file is
|
|
254 |
not found or if the buffer is not visiting a file."
|
|
255 |
(progn
|
|
256 |
(defun find-tags-file-r (path)
|
|
257 |
"Find the tags file from current to the parent directories."
|
|
258 |
(let* ((parent-directory (file-name-directory (directory-file-name path)))
|
|
259 |
(tags-file-name (concat (file-name-as-directory path) "TAGS")))
|
|
260 |
(cond
|
|
261 |
((file-exists-p tags-file-name) (throw 'found tags-file-name))
|
|
262 |
((string= "/TAGS" tags-file-name) nil)
|
|
263 |
(t (find-tags-file-r parent-directory)))))
|
|
264 |
|
|
265 |
(if (buffer-file-name)
|
|
266 |
(catch 'found
|
|
267 |
(find-tags-file-r (file-name-directory buffer-file-name)))
|
|
268 |
nil)))
|
|
269 |
|
|
270 |
(defun ctags-set-tags-file ()
|
|
271 |
"Uses `ctags-find-tags-file' to find a TAGS file. If found,
|
|
272 |
set 'tags-file-name' with its path or set as nil."
|
|
273 |
(setq-default tags-file-name (ctags-find-tags-file)))
|
|
274 |
|
|
275 |
(defun ctags-create-tags-table ()
|
|
276 |
(interactive)
|
|
277 |
(let* ((current-directory default-directory)
|
|
278 |
(top-directory (read-directory-name
|
|
279 |
"Top of source tree: " default-directory))
|
|
280 |
(file-name (concat (file-name-as-directory top-directory) "TAGS")))
|
|
281 |
(cd top-directory)
|
|
282 |
(if (not (= 0 (ctags)))
|
|
283 |
(message "Error creating %s!" file-name)
|
|
284 |
(setq-default tags-file-name file-name)
|
|
285 |
(message "Table %s created and configured." tags-file-name))
|
|
286 |
(cd current-directory)))
|
|
287 |
|
|
288 |
(defun ctags-update-tags-table ()
|
|
289 |
(interactive)
|
|
290 |
(let ((current-directory default-directory))
|
|
291 |
(if (not tags-file-name)
|
|
292 |
(message "Tags table not configured.")
|
|
293 |
(cd (file-name-directory tags-file-name))
|
|
294 |
(if (not (= 0 (ctags)))
|
|
295 |
(message "Error updating %s!" tags-file-name)
|
|
296 |
(message "Table %s updated." tags-file-name))
|
|
297 |
(cd current-directory))))
|
|
298 |
|
|
299 |
(defun ctags-create-or-update-tags-table ()
|
|
300 |
"Create or update a tags table with `ctags-command'."
|
|
301 |
(interactive)
|
|
302 |
(if (not (ctags-set-tags-file))
|
|
303 |
(ctags-create-tags-table)
|
|
304 |
(ctags-update-tags-table)))
|
|
305 |
|
|
306 |
|
|
307 |
(defun ctags-search ()
|
|
308 |
"A wrapper for `tags-search' that provide a default input."
|
|
309 |
(interactive)
|
|
310 |
(let* ((symbol-at-point (symbol-at-point))
|
|
311 |
(default (symbol-name symbol-at-point))
|
|
312 |
(input (read-from-minibuffer
|
|
313 |
(if (symbol-at-point)
|
|
314 |
(concat "Tags search (default " default "): ")
|
|
315 |
"Tags search (regexp): "))))
|
|
316 |
(if (and (symbol-at-point) (string= input ""))
|
|
317 |
(tags-search default)
|
|
318 |
(if (string= input "")
|
|
319 |
(message "You must provide a regexp.")
|
|
320 |
(tags-search input)))))
|
|
321 |
#+END_SRC
|
|
322 |
|
990949
|
323 |
* Small tweaks
|
C |
324 |
** Remove startup screen
|
0ba1ff
|
325 |
Start on scratch buffer instead.
|
990949
|
326 |
#+BEGIN_SRC emacs-lisp
|
C |
327 |
(setq inhibit-startup-message t)
|
|
328 |
#+END_SRC
|
8a38cc
|
329 |
|
990949
|
330 |
** Disable bell
|
0ba1ff
|
331 |
Bloody bell dings every time you hit a key too much.
|
990949
|
332 |
#+BEGIN_SRC emacs-lisp
|
C |
333 |
(setq ring-bell-function 'ignore)
|
|
334 |
#+END_SRC
|
8a38cc
|
335 |
|
990949
|
336 |
** Pretty symbols
|
0ba1ff
|
337 |
Why not? They make it look nice.
|
990949
|
338 |
#+BEGIN_SRC emacs-lisp
|
C |
339 |
(when window-system
|
|
340 |
(use-package pretty-mode
|
|
341 |
:ensure t
|
|
342 |
:diminish t
|
|
343 |
:config
|
|
344 |
(global-pretty-mode)))
|
|
345 |
#+END_SRC
|
8a38cc
|
346 |
|
0ba1ff
|
347 |
** COMMENT Find file other window
|
990949
|
348 |
Lets it accept more than one file. Works recursively.
|
C |
349 |
#+BEGIN_SRC emacs-lisp
|
|
350 |
(defadvice find-file-other-window (around find-files activate)
|
|
351 |
(if (listp filename)
|
|
352 |
(loop for f in filename do (find-file-other-window f wildcards))
|
|
353 |
ad-do-it))
|
|
354 |
#+END_SRC
|
8a38cc
|
355 |
|
990949
|
356 |
** Which key
|
0ba1ff
|
357 |
Helps to explain keybindings if you get lost.
|
990949
|
358 |
#+BEGIN_SRC emacs-lisp
|
C |
359 |
(use-package which-key
|
|
360 |
:ensure t
|
|
361 |
:diminish which-key-mode
|
|
362 |
:config
|
|
363 |
(which-key-mode))
|
|
364 |
#+END_SRC
|
8a38cc
|
365 |
|
bf794a
|
366 |
** Config shortcuts
|
JG |
367 |
*** Go to this file
|
990949
|
368 |
#+BEGIN_SRC emacs-lisp
|
C |
369 |
(defun config-visit ()
|
|
370 |
(interactive)
|
|
371 |
(find-file "~/.emacs.d/config.org"))
|
|
372 |
(global-set-key (kbd "C-c e d") 'config-visit)
|
|
373 |
#+END_SRC
|
8a38cc
|
374 |
|
bf794a
|
375 |
*** Go to init.el
|
990949
|
376 |
#+BEGIN_SRC emacs-lisp
|
C |
377 |
(defun init-visit ()
|
|
378 |
(interactive)
|
|
379 |
(find-file "~/.emacs.d/init.el"))
|
|
380 |
(global-set-key (kbd "C-c e i") 'init-visit)
|
|
381 |
#+END_SRC
|
8a38cc
|
382 |
|
bf794a
|
383 |
*** Reload configuration
|
990949
|
384 |
#+BEGIN_SRC emacs-lisp
|
C |
385 |
(defun config-reload ()
|
|
386 |
"Reloads ~/.emacs.d/config.org at run time"
|
|
387 |
(interactive)
|
|
388 |
(org-babel-load-file (expand-file-name "~/.emacs.d/config.org")))
|
|
389 |
(global-set-key (kbd "C-c e r") 'config-reload)
|
|
390 |
#+END_SRC
|
8a38cc
|
391 |
|
990949
|
392 |
** Smartparens
|
0ba1ff
|
393 |
Matches brackets automatically. Added "$" for latex in org mode.
|
990949
|
394 |
#+BEGIN_SRC emacs-lisp
|
0ba1ff
|
395 |
(use-package smartparens
|
JG |
396 |
:ensure t
|
|
397 |
:diminish smartparens-mode
|
|
398 |
:config
|
|
399 |
(progn
|
|
400 |
(require 'smartparens-config)
|
|
401 |
(smartparens-global-mode 1))
|
|
402 |
(sp-with-modes 'org-mode
|
|
403 |
(sp-local-pair "$" "$")))
|
990949
|
404 |
#+END_SRC
|
8a38cc
|
405 |
|
0ba1ff
|
406 |
** COMMENT Rainbow
|
JG |
407 |
Its a little gimmicky but its still cool.
|
|
408 |
Colours according to code after a "#", works with 3 and 6 character hex codes.
|
990949
|
409 |
#+BEGIN_SRC emacs-lisp
|
C |
410 |
(use-package rainbow-mode
|
|
411 |
:ensure t
|
|
412 |
:diminish rainbow-mode
|
|
413 |
:init
|
|
414 |
(add-hook 'prog-mode-hook 'rainbow-mode))
|
|
415 |
#+END_SRC
|
8a38cc
|
416 |
|
990949
|
417 |
** Rainbow delimiters
|
C |
418 |
A bit more useful than above.
|
|
419 |
Colours the brackets so that they stand out more.
|
|
420 |
#+BEGIN_SRC emacs-lisp
|
|
421 |
(use-package rainbow-delimiters
|
|
422 |
:ensure t
|
|
423 |
:init
|
|
424 |
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode))
|
|
425 |
#+END_SRC
|
8a38cc
|
426 |
|
0ba1ff
|
427 |
** Following whitespace
|
990949
|
428 |
Removes unnecessary white space
|
C |
429 |
#+BEGIN_SRC emacs-lisp
|
0ba1ff
|
430 |
(use-package clean-aindent-mode
|
JG |
431 |
:ensure t
|
|
432 |
:hook prog-mode)
|
990949
|
433 |
#+END_SRC
|
C |
434 |
Shows trailing white space
|
|
435 |
#+BEGIN_SRC emacs-lisp
|
|
436 |
(add-hook 'prog-mode-hook (lambda () (interactive) (setq show-trailing-whitespace 1)))
|
|
437 |
#+END_SRC
|
8a38cc
|
438 |
|
0ba1ff
|
439 |
** Whitespace mode
|
990949
|
440 |
Reveals whitespace characters
|
C |
441 |
#+BEGIN_SRC emacs-lisp
|
|
442 |
(global-set-key (kbd "C-c w") 'whitespace-mode)
|
|
443 |
(add-hook 'diff-mode-hook (lambda ()
|
|
444 |
(setq-local whitespace-style
|
|
445 |
'(face
|
|
446 |
tabs
|
|
447 |
tab-mark
|
|
448 |
spaces
|
|
449 |
space-mark
|
|
450 |
trailing
|
|
451 |
indentation::space
|
|
452 |
indentation::tab
|
|
453 |
newline
|
|
454 |
newline-mark))
|
|
455 |
(whitespace-mode 1)))
|
|
456 |
|
|
457 |
#+END_SRC
|
8a38cc
|
458 |
|
990949
|
459 |
** eldoc
|
0ba1ff
|
460 |
Shows function arguments in echo area below mode line.
|
990949
|
461 |
#+BEGIN_SRC emacs-lisp
|
0ba1ff
|
462 |
(diminish eldoc-mode)
|
990949
|
463 |
(add-hook 'emacs-lisp-mode-hook 'eldoc-mode)
|
C |
464 |
(add-hook 'lisp-interaction-mode-hook 'eldoc-mode)
|
|
465 |
(add-hook 'ielm-mode-hook 'eldoc-mode)
|
|
466 |
#+END_SRC
|
8a38cc
|
467 |
|
0ba1ff
|
468 |
** Key frequency statistics
|
JG |
469 |
Collects interesting statistics about key presses.
|
|
470 |
Use M-x keyfreq-show to show in emacs or M-x keyfreq-html to output
|
990949
|
471 |
#+BEGIN_SRC emacs-lisp
|
C |
472 |
(use-package keyfreq
|
|
473 |
:ensure t
|
|
474 |
:config
|
|
475 |
(keyfreq-mode 1)
|
|
476 |
(keyfreq-autosave-mode 1))
|
|
477 |
#+END_SRC
|
8a38cc
|
478 |
|
0ba1ff
|
479 |
** Undo tree
|
JG |
480 |
A more advanced undo mechanism.
|
|
481 |
Supports branched undo history (thus the tree).
|
|
482 |
Pretty neat, if seldom used.
|
990949
|
483 |
#+BEGIN_SRC emacs-lisp
|
C |
484 |
(use-package undo-tree
|
|
485 |
:ensure t
|
|
486 |
:diminish undo-tree-mode
|
|
487 |
:config
|
|
488 |
(global-undo-tree-mode))
|
|
489 |
#+END_SRC
|
8a38cc
|
490 |
|
0ba1ff
|
491 |
** Volatile highlights
|
990949
|
492 |
Colour the material just copied
|
C |
493 |
#+BEGIN_SRC emacs-lisp
|
|
494 |
(use-package volatile-highlights
|
|
495 |
:ensure t
|
|
496 |
:diminish volatile-highlights-mode
|
|
497 |
:config
|
|
498 |
(volatile-highlights-mode t))
|
|
499 |
#+END_SRC
|
8a38cc
|
500 |
|
990949
|
501 |
** ibuffer
|
0ba1ff
|
502 |
View all open buffers in their own buffer rather in the temporary mini buffer.
|
990949
|
503 |
#+BEGIN_SRC emacs-lisp
|
C |
504 |
(global-set-key (kbd "C-x C-b") 'ibuffer)
|
|
505 |
(setq ibuffer-use-other-window t)
|
|
506 |
#+END_SRC
|
8a38cc
|
507 |
|
0ba1ff
|
508 |
** Hippie expand
|
JG |
509 |
Seems cool, but I don't think I ever use this.
|
|
510 |
Meant to suggest completions to beginning of a word.
|
990949
|
511 |
#+BEGIN_SRC emacs-lisp
|
C |
512 |
(global-set-key (kbd "M-/") 'hippie-expand) ;; replace dabbrev-expand
|
|
513 |
(setq
|
|
514 |
hippie-expand-try-functions-list
|
|
515 |
'(try-expand-dabbrev ;; Try to expand word "dynamically", searching the current buffer.
|
|
516 |
try-expand-dabbrev-all-buffers ;; Try to expand word "dynamically", searching all other buffers.
|
|
517 |
try-expand-dabbrev-from-kill ;; Try to expand word "dynamically", searching the kill ring.
|
|
518 |
try-complete-file-name-partially ;; Try to complete text as a file name, as many characters as unique.
|
|
519 |
try-complete-file-name ;; Try to complete text as a file name.
|
|
520 |
try-expand-all-abbrevs ;; Try to expand word before point according to all abbrev tables.
|
|
521 |
try-expand-list ;; Try to complete the current line to an entire line in the buffer.
|
|
522 |
try-expand-line ;; Try to complete the current line to an entire line in the buffer.
|
|
523 |
try-complete-lisp-symbol-partially ;; Try to complete as an Emacs Lisp symbol, as many characters as unique.
|
|
524 |
try-complete-lisp-symbol) ;; Try to complete word as an Emacs Lisp symbol.
|
|
525 |
)
|
|
526 |
#+END_SRC
|
8a38cc
|
527 |
|
990949
|
528 |
** Highlight line
|
0ba1ff
|
529 |
Very useful for finding where you are.
|
990949
|
530 |
#+BEGIN_SRC emacs-lisp
|
C |
531 |
(global-hl-line-mode)
|
|
532 |
#+END_SRC
|
8a38cc
|
533 |
|
990949
|
534 |
** Line numbers
|
0ba1ff
|
535 |
Everyone needs line numbers when programming.
|
990949
|
536 |
#+BEGIN_SRC emacs-lisp
|
C |
537 |
(add-hook 'prog-mode-hook 'linum-mode)
|
|
538 |
#+END_SRC
|
|
539 |
|
|
540 |
** Garbage collection
|
0ba1ff
|
541 |
Starts garbage collection every 100MB.
|
990949
|
542 |
#+BEGIN_SRC emacs-lisp
|
C |
543 |
(setq gc-cons-threshold 100000000)
|
|
544 |
#+END_SRC
|
|
545 |
|
|
546 |
** Kill ring
|
|
547 |
Changes the kill ring size to 5000.
|
|
548 |
#+BEGIN_SRC emacs-lisp
|
|
549 |
(setq global-mark-ring-max 5000
|
|
550 |
mark-ring-max 5000
|
|
551 |
mode-require-final-newline t
|
|
552 |
kill-ring-max 5000
|
|
553 |
kill-whole-line t)
|
|
554 |
#+END_SRC
|
8a38cc
|
555 |
|
990949
|
556 |
** Coding style
|
0ba1ff
|
557 |
Use java for java, awk for awk and K&R for everything else.
|
JG |
558 |
K&R uses 4 space tabs.
|
990949
|
559 |
#+BEGIN_SRC emacs-lisp
|
bf794a
|
560 |
(setq c-default-style '((java-mode . "java")
|
JG |
561 |
(awk-mode . "awk")
|
|
562 |
(other . "k&r")))
|
990949
|
563 |
#+END_SRC
|
C |
564 |
|
|
565 |
** Coding system
|
0ba1ff
|
566 |
Cause we all love UTF8
|
990949
|
567 |
#+BEGIN_SRC emacs-lisp
|
bf794a
|
568 |
(set-terminal-coding-system 'utf-8)
|
JG |
569 |
(set-keyboard-coding-system 'utf-8)
|
|
570 |
(set-language-environment "UTF-8")
|
|
571 |
(prefer-coding-system 'utf-8)
|
|
572 |
(setq-default indent-tabs-mode t
|
|
573 |
tab-width 4)
|
|
574 |
(delete-selection-mode)
|
|
575 |
(global-set-key (kbd "RET") 'newline-and-indent)
|
990949
|
576 |
#+END_SRC
|
8a38cc
|
577 |
|
990949
|
578 |
** Move to beginning of line ignoring whitespace
|
C |
579 |
Move point back to indentation of beginning of line.
|
0ba1ff
|
580 |
Pretty good for getting to the start of what you actually wanted.
|
990949
|
581 |
|
C |
582 |
Move point to the first non-whitespace character on this line.
|
|
583 |
If point is already there, move to the beginning of the line.
|
|
584 |
Effectively toggle between the first non-whitespace character and
|
|
585 |
the beginning of the line.
|
|
586 |
|
|
587 |
If ARG is not nil or 1, move forward ARG - 1 lines first. If
|
|
588 |
point reaches the beginning or end of the buffer, stop there.
|
|
589 |
#+BEGIN_SRC emacs-lisp
|
|
590 |
(defun prelude-move-beginning-of-line (arg)
|
|
591 |
(interactive "^p")
|
|
592 |
(setq arg (or arg 1))
|
|
593 |
|
|
594 |
;; Move lines first
|
|
595 |
(when (/= arg 1)
|
|
596 |
(let ((line-move-visual nil))
|
|
597 |
(forward-line (1- arg))))
|
|
598 |
|
|
599 |
(let ((orig-point (point)))
|
|
600 |
(back-to-indentation)
|
|
601 |
(when (= orig-point (point))
|
|
602 |
(move-beginning-of-line 1))))
|
|
603 |
|
|
604 |
(global-set-key (kbd "C-a") 'prelude-move-beginning-of-line)
|
|
605 |
#+END_SRC
|
8a38cc
|
606 |
|
990949
|
607 |
** Indent region or buffer
|
0ba1ff
|
608 |
Indent, slightly different to standard tab or C-M-\.
|
990949
|
609 |
#+BEGIN_SRC emacs-lisp
|
C |
610 |
(defun indent-region-or-buffer ()
|
|
611 |
"Indent a region if selected, otherwise the whole buffer."
|
|
612 |
(interactive)
|
|
613 |
(unless (member major-mode prelude-indent-sensitive-modes)
|
|
614 |
(save-excursion
|
|
615 |
(if (region-active-p)
|
|
616 |
(progn
|
|
617 |
(indent-region (region-beginning) (region-end))
|
|
618 |
(message "Indented selected region."))
|
|
619 |
(progn
|
|
620 |
(indent-buffer)
|
|
621 |
(message "Indented buffer.")))
|
|
622 |
(whitespace-cleanup))))
|
|
623 |
|
|
624 |
(global-set-key (kbd "C-c i") 'indent-region-or-buffer)
|
|
625 |
#+END_SRC
|
8a38cc
|
626 |
|
990949
|
627 |
** Tramp
|
0ba1ff
|
628 |
Remote editing mode.
|
JG |
629 |
Hate having to re-input passwords.
|
990949
|
630 |
#+BEGIN_SRC emacs-lisp
|
C |
631 |
(when (eq system-type 'windows-nt)
|
|
632 |
(setq tramp-default-method "pscp"))
|
|
633 |
(setq password-cache-expiry nil)
|
|
634 |
#+END_SRC
|
|
635 |
|
0ba1ff
|
636 |
** COMMENT Y or N instead of yes or no
|
JG |
637 |
Need not type out whole word.
|
|
638 |
#+BEGIN_SRC emacs-lisp
|
|
639 |
(defalias 'yes-or-no-p 'y-or-n-p)
|
|
640 |
#+END_SRC
|
|
641 |
|
990949
|
642 |
* Mode line tweaks
|
C |
643 |
Diminish is used but is included in init.el such that it can be used throughout this document
|
|
644 |
** Spaceline
|
0ba1ff
|
645 |
A little easier to read than the default emacs mode line.
|
990949
|
646 |
#+BEGIN_SRC emacs-lisp
|
412080
|
647 |
(use-package spaceline
|
C |
648 |
:ensure t
|
|
649 |
:config
|
|
650 |
(require 'spaceline-config)
|
|
651 |
(setq spaceline-buffer-encoding-abbrev-p t)
|
|
652 |
(setq spaceline-line-column-p t)
|
|
653 |
(setq spaceline-line-p t)
|
|
654 |
(setq powerline-default-separator (quote arrow))
|
|
655 |
(spaceline-spacemacs-theme)
|
|
656 |
(spaceline-helm-mode))
|
990949
|
657 |
#+END_SRC
|
8a38cc
|
658 |
|
990949
|
659 |
* Programming tweaks
|
C |
660 |
** Yasnippet
|
0ba1ff
|
661 |
Add snippets, pretty useful.
|
JG |
662 |
Manually added snippets are in ~/.emacs.d/snippets/{mode}.
|
990949
|
663 |
#+BEGIN_SRC emacs-lisp
|
bf794a
|
664 |
(use-package yasnippet
|
JG |
665 |
:ensure t
|
|
666 |
:diminish yas-minor-mode
|
|
667 |
:config
|
|
668 |
(use-package yasnippet-snippets
|
|
669 |
:ensure t)
|
|
670 |
(yas-reload-all)
|
|
671 |
(yas-global-mode 1))
|
990949
|
672 |
#+END_SRC
|
8a38cc
|
673 |
|
0ba1ff
|
674 |
** Flycheck
|
JG |
675 |
Basic linter. Works pretty well.
|
990949
|
676 |
#+BEGIN_SRC emacs-lisp
|
8a38cc
|
677 |
(use-package flycheck
|
C |
678 |
:ensure t
|
|
679 |
:diminish flycheck-mode
|
|
680 |
:config
|
|
681 |
(global-flycheck-mode))
|
990949
|
682 |
#+END_SRC
|
0ba1ff
|
683 |
*** flycheck-pos-tip
|
JG |
684 |
Add suggestions at the cursor.
|
990949
|
685 |
#+BEGIN_SRC emacs-lisp
|
C |
686 |
(use-package flycheck-pos-tip
|
|
687 |
:ensure t
|
|
688 |
:after flycheck
|
|
689 |
:config
|
|
690 |
(flycheck-pos-tip-mode))
|
|
691 |
#+END_SRC
|
8a38cc
|
692 |
|
990949
|
693 |
** Company
|
0ba1ff
|
694 |
Company is auto-complete for Emacs.
|
JG |
695 |
Uses various backends, more of which are added later.
|
990949
|
696 |
#+BEGIN_SRC emacs-lisp
|
C |
697 |
(use-package company
|
|
698 |
:ensure t
|
|
699 |
:diminish company-mode
|
|
700 |
:config
|
|
701 |
(global-company-mode)
|
|
702 |
(setq company-idle-delay 0)
|
|
703 |
(setq company-minimum-prefix-length 3))
|
|
704 |
#+END_SRC
|
8a38cc
|
705 |
|
990949
|
706 |
** Magit
|
0ba1ff
|
707 |
Emacs git client.
|
JG |
708 |
Pretty good and offers fairly decent features.
|
990949
|
709 |
#+BEGIN_SRC emacs-lisp
|
C |
710 |
(use-package magit
|
|
711 |
:ensure t
|
|
712 |
:commands magit-get-top-dir
|
|
713 |
:bind ("C-x g" . magit-status)
|
|
714 |
:init
|
|
715 |
(progn
|
|
716 |
;; make magit status go full-screen but remember previous window
|
|
717 |
;; settings
|
|
718 |
;; from: http://whattheemacsd.com/setup-magit.el-01.html
|
|
719 |
(defadvice magit-status (around magit-fullscreen activate)
|
|
720 |
(window-configuration-to-register :magit-fullscreen)
|
|
721 |
ad-do-it
|
|
722 |
(delete-other-windows))
|
|
723 |
|
|
724 |
;; Close popup when committing - this stops the commit window
|
|
725 |
;; hanging around
|
|
726 |
;; From: http://git.io/rPBE0Q
|
|
727 |
(defadvice git-commit-commit (after delete-window activate)
|
|
728 |
(delete-window))
|
|
729 |
|
|
730 |
(defadvice git-commit-abort (after delete-window activate)
|
|
731 |
(delete-window))
|
|
732 |
|
|
733 |
:config
|
|
734 |
(progn
|
|
735 |
;; restore previously hidden windows
|
|
736 |
(defadvice magit-quit-window (around magit-restore-screen activate)
|
|
737 |
(let ((current-mode major-mode))
|
|
738 |
ad-do-it
|
|
739 |
;; we only want to jump to register when the last seen buffer
|
|
740 |
;; was a magit-status buffer.
|
|
741 |
(when (eq 'magit-status-mode current-mode)
|
|
742 |
(jump-to-register :magit-fullscreen)))))
|
|
743 |
|
|
744 |
;; magit settings
|
|
745 |
(setq
|
|
746 |
;; don't put "origin-" in front of new branch names by default
|
|
747 |
magit-default-tracking-name-function 'magit-default-tracking-name-branch-only
|
|
748 |
;; open magit status in same window as current buffer
|
|
749 |
magit-status-buffer-switch-function 'switch-to-buffer
|
|
750 |
;; highlight word/letter changes in hunk diffs
|
|
751 |
magit-diff-refine-hunk t
|
|
752 |
;; ask me if I want to include a revision when rewriting
|
|
753 |
magit-rewrite-inclusive 'ask
|
|
754 |
;; ask me to save buffers
|
|
755 |
magit-save-some-buffers t
|
|
756 |
;; pop the process buffer if we're taking a while to complete
|
|
757 |
magit-process-popup-time 10
|
|
758 |
;; ask me if I want a tracking upstream
|
|
759 |
magit-set-upstream-on-push 'askifnotset
|
|
760 |
)))
|
|
761 |
#+END_SRC
|
8a38cc
|
762 |
|
990949
|
763 |
** CEDET
|
0ba1ff
|
764 |
*** Semantic
|
JG |
765 |
Parser library for code, supports many other packages.
|
|
766 |
Allows emacs to be mode aware of what is being written.
|
990949
|
767 |
#+BEGIN_SRC emacs-lisp
|
C |
768 |
(use-package semantic
|
|
769 |
:config
|
|
770 |
(global-semanticdb-minor-mode 1)
|
|
771 |
(global-semantic-idle-scheduler-mode 1)
|
|
772 |
(global-semantic-idle-summary-mode 1)
|
|
773 |
(semantic-mode 1))
|
|
774 |
#+END_SRC
|
8a38cc
|
775 |
|
990949
|
776 |
*** EDE
|
0ba1ff
|
777 |
Emacs Development Environment.
|
JG |
778 |
Can be used to manage and create build files for a project.
|
990949
|
779 |
#+BEGIN_SRC emacs-lisp
|
C |
780 |
(use-package ede
|
|
781 |
:config
|
|
782 |
(global-ede-mode t))
|
|
783 |
#+END_SRC
|
8a38cc
|
784 |
|
990949
|
785 |
*** gdb-many-windows
|
0ba1ff
|
786 |
Enhances the use of GDB in emacs.
|
JG |
787 |
Shows register contents, variable contents and others in addition to GDB shell.
|
|
788 |
Also shows source code while debugging.
|
990949
|
789 |
#+BEGIN_SRC emacs-lisp
|
C |
790 |
(setq
|
|
791 |
gdb-many-windows t
|
|
792 |
gdb-show-main t)
|
|
793 |
#+END_SRC
|
8a38cc
|
794 |
|
0ba1ff
|
795 |
*** COMMENT Semantic refactor
|
JG |
796 |
Trying to get this to work.
|
|
797 |
Should help to refactor file.
|
990949
|
798 |
#+BEGIN_SRC emacs-lisp
|
0ba1ff
|
799 |
(use-package srefactor
|
JG |
800 |
:ensure t
|
|
801 |
:bind (("M-RET o" . 'srefactor-lisp-one-line)
|
|
802 |
("M-RET m" . 'srefactor-lisp-format-sexp)
|
|
803 |
("M-RET d" . 'srefactor-lisp-format-defun)
|
|
804 |
("M-RET b" . 'srefactor-lisp-format-buffer)
|
|
805 |
:map c-mode-base-map
|
|
806 |
("M-RET" . 'srefactor-refactor-at-point)
|
|
807 |
:map c++-mode-map
|
|
808 |
("M-RET" . 'srefactor-refactor-at-point)))
|
990949
|
809 |
#+END_SRC
|
8a38cc
|
810 |
|
990949
|
811 |
** Language specific configs
|
C |
812 |
*** C/C++
|
0ba1ff
|
813 |
**** COMMENT yasnippet
|
JG |
814 |
Enable yasnippet for C/C++.
|
990949
|
815 |
#+BEGIN_SRC emacs-lisp
|
C |
816 |
(add-hook 'c++-mode-hook 'yas-minor-mode)
|
|
817 |
(add-hook 'c-mode-hook 'yas-minor-mode)
|
|
818 |
#+END_SRC
|
8a38cc
|
819 |
|
0ba1ff
|
820 |
**** Flycheck clang
|
JG |
821 |
Add the clang backend for linting.
|
990949
|
822 |
#+BEGIN_SRC emacs-lisp
|
C |
823 |
(use-package flycheck-clang-analyzer
|
|
824 |
:ensure t
|
|
825 |
:config
|
|
826 |
(with-eval-after-load 'flycheck
|
|
827 |
(require 'flycheck-clang-analyzer)
|
|
828 |
(flycheck-clang-analyzer-setup)))
|
|
829 |
#+END_SRC
|
8a38cc
|
830 |
|
0ba1ff
|
831 |
**** Company
|
JG |
832 |
Add header completion as well as Irony, which uses clang for suggestions.
|
990949
|
833 |
#+BEGIN_SRC emacs-lisp
|
C |
834 |
(use-package company-c-headers
|
|
835 |
:ensure t
|
|
836 |
:after company
|
|
837 |
:config
|
|
838 |
(add-hook 'c++-mode-hook 'company-mode)
|
|
839 |
(add-hook 'c-mode-hook 'company-mode))
|
|
840 |
|
|
841 |
(use-package irony
|
|
842 |
:ensure t
|
|
843 |
:init
|
|
844 |
(setq w32-pipe-read-delay 0)
|
|
845 |
(setq irony-server-w32-pipe-buffer-size (* 64 1024))
|
|
846 |
(add-hook 'c++-mode-hook 'irony-mode)
|
|
847 |
(add-hook 'c-mode-hook 'irony-mode)
|
|
848 |
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)
|
|
849 |
(add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options))
|
0ba1ff
|
850 |
|
JG |
851 |
(use-package company-irony
|
|
852 |
:ensure t
|
|
853 |
:config
|
|
854 |
(add-to-list 'company-backends '(company-c-headers
|
|
855 |
company-dabbrev-code
|
|
856 |
company-irony)))
|
990949
|
857 |
#+END_SRC
|
8a38cc
|
858 |
|
990949
|
859 |
*** emacs-lisp
|
0ba1ff
|
860 |
**** COMMENT yasnippet
|
JG |
861 |
Enable yasnippet.
|
990949
|
862 |
#+BEGIN_SRC emacs-lisp
|
C |
863 |
(add-hook 'emacs-lisp-mode-hook 'yas-minor-mode)
|
|
864 |
#+END_SRC
|
8a38cc
|
865 |
|
0ba1ff
|
866 |
**** COMMENT company
|
JG |
867 |
Add slime backend.
|
990949
|
868 |
#+BEGIN_SRC emacs-lisp
|
C |
869 |
(add-hook 'emacs-lisp-mode-hook 'company-mode)
|
|
870 |
|
|
871 |
(use-package slime
|
|
872 |
:ensure t
|
|
873 |
:config
|
|
874 |
(setq inferior-lisp-program "/usr/bin/sbcl")
|
|
875 |
(setq slime-contribs '(slime-fancy)))
|
|
876 |
|
|
877 |
(use-package slime-company
|
|
878 |
:ensure t
|
|
879 |
:init
|
|
880 |
(require 'company)
|
|
881 |
(slime-setup '(slime-fancy slime-company)))
|
|
882 |
#+END_SRC
|
8a38cc
|
883 |
|
bf794a
|
884 |
*** COMMENT x86
|
990949
|
885 |
**** x86-lookup
|
0ba1ff
|
886 |
Look up reference PDF. Use Intel manual.
|
990949
|
887 |
#+BEGIN_SRC emacs-lisp
|
C |
888 |
(use-package x86-lookup
|
|
889 |
:ensure t
|
|
890 |
:init
|
|
891 |
(setq x86-lookup-pdf "D:/Coding/x86-instructions.pdf")
|
|
892 |
:bind ("C-h x" . x86-lookup))
|
|
893 |
#+END_SRC
|
8a38cc
|
894 |
|
990949
|
895 |
*** Latex
|
C |
896 |
**** AucTex
|
0ba1ff
|
897 |
AucTex contains many additions to make tex editing good.
|
990949
|
898 |
#+BEGIN_SRC emacs-lisp
|
20e001
|
899 |
(use-package tex
|
C |
900 |
:ensure auctex
|
|
901 |
:config
|
|
902 |
(setq TeX-auto-save t)
|
|
903 |
(setq TeX-parse-self t)
|
|
904 |
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
|
|
905 |
TeX-source-correlate-start-server t)
|
|
906 |
(add-hook 'TeX-after-compilation-finished-functions #'TeX-revert-document-buffer))
|
990949
|
907 |
#+END_SRC
|
8a38cc
|
908 |
|
990949
|
909 |
**** Company
|
0ba1ff
|
910 |
Help company complete tex math and references.
|
990949
|
911 |
#+BEGIN_SRC emacs-lisp
|
C |
912 |
(use-package company-math
|
|
913 |
:ensure t
|
|
914 |
:after company
|
|
915 |
:config
|
|
916 |
(add-to-list 'company-backends 'company-math-symbols-unicode))
|
|
917 |
|
|
918 |
(use-package company-reftex
|
|
919 |
:ensure t
|
|
920 |
:after company
|
|
921 |
:config
|
|
922 |
(add-to-list 'company-backends 'company-reftex))
|
|
923 |
|
|
924 |
(use-package company-auctex
|
|
925 |
:ensure t
|
|
926 |
:after company
|
|
927 |
:config
|
|
928 |
(company-auctex-init))
|
|
929 |
|
|
930 |
(use-package company-bibtex
|
|
931 |
:ensure t
|
|
932 |
:after company
|
|
933 |
(add-to-list 'company-backends 'company-bibtex))
|
|
934 |
#+END_SRC
|
8a38cc
|
935 |
|
bf794a
|
936 |
**** TeXcount
|
0ba1ff
|
937 |
Word counts in latex.
|
JG |
938 |
Uses a Perl script.
|
|
939 |
#+BEGIN_SRC emacs-lisp
|
|
940 |
(defun get-texcount-latest()
|
|
941 |
(if (not(file-directory-p "~/.texcount"))
|
|
942 |
(make-directory "~/.texcount"))
|
|
943 |
(url-copy-file "https://app.uio.no/ifi/texcount/download.php?file=texcount_3_1_1.zip" "~/.texcount/texcount.zip" 1)
|
|
944 |
(shell-command "unzip -o ~/.texcount/texcount.zip -d ~/.texcount")
|
|
945 |
(add-to-list 'exec-path "~/.texcount/texcount.pl"))
|
20e001
|
946 |
|
0ba1ff
|
947 |
(if (not(file-exists-p "~/.texcount/texcount.pl"))
|
JG |
948 |
(get-texcount-latest))
|
990949
|
949 |
|
0ba1ff
|
950 |
(defun texcount ()
|
JG |
951 |
(interactive)
|
|
952 |
(let*
|
|
953 |
( (this-file (buffer-file-name))
|
|
954 |
(enc-str (symbol-name buffer-file-coding-system))
|
|
955 |
(enc-opt
|
|
956 |
(cond
|
|
957 |
((string-match "utf-8" enc-str) "-utf8")
|
|
958 |
((string-match "latin" enc-str) "-latin1")
|
|
959 |
("-encoding=guess")
|
|
960 |
) )
|
|
961 |
(word-count
|
|
962 |
(with-output-to-string
|
|
963 |
(with-current-buffer standard-output
|
|
964 |
(call-process "texcount" nil t nil "-0" enc-opt this-file)
|
|
965 |
) ) ) )
|
|
966 |
(message word-count)
|
|
967 |
) )
|
|
968 |
(add-hook 'LaTeX-mode-hook (lambda () (define-key LaTeX-mode-map (kbd "C-c c") 'texcount)))
|
|
969 |
(add-hook 'latex-mode-hook (lambda () (define-key latex-mode-map (kbd "C-c c") 'texcount)))
|
|
970 |
#+END_SRC
|
990949
|
971 |
|
C |
972 |
*** PlantUML
|
0ba1ff
|
973 |
Sets the PlantUML path for the mode to generate models.
|
990949
|
974 |
#+BEGIN_SRC emacs-lisp
|
bf794a
|
975 |
(use-package plantuml-mode
|
JG |
976 |
:ensure t
|
|
977 |
:init
|
|
978 |
(cond ((eq system-type 'windows-nt)
|
|
979 |
(setq plantuml-jar-path "c:/ProgramData/chocolatey/lib/plantuml/tools/plantuml.jar"))
|
|
980 |
((eq system-type 'gnu/linux)
|
|
981 |
(setq plantuml-jar-path "/usr/share/java/plantuml/plantuml.jar"))))
|
990949
|
982 |
#+END_SRC
|
C |
983 |
|
bf794a
|
984 |
*** COMMENT Racket
|
990949
|
985 |
**** Major mode
|
0ba1ff
|
986 |
Set racket path in windows and enable racket mode.
|
990949
|
987 |
#+BEGIN_SRC emacs-lisp
|
C |
988 |
(when (eq system-type 'windows-nt)
|
|
989 |
(add-to-list 'exec-path "c:/Program Files/Racket")
|
|
990 |
(setenv "PATH" (mapconcat #'identity exec-path path-separator)))
|
|
991 |
|
|
992 |
(use-package racket-mode
|
|
993 |
:ensure t
|
|
994 |
:config
|
|
995 |
(autoload 'racket-mode "Racket" "Racket Editing Mode" t)
|
|
996 |
(add-to-list
|
|
997 |
'auto-mode-alist
|
8a38cc
|
998 |
'("\\.rkt$" . racket-mode))
|
990949
|
999 |
(setq matlab-indent-function t))
|
C |
1000 |
#+END_SRC
|
|
1001 |
|
0ba1ff
|
1002 |
*** COMMENT Verilog
|
baf326
|
1003 |
**** Get latest version
|
0ba1ff
|
1004 |
Pull the latest version from the web.
|
baf326
|
1005 |
#+BEGIN_SRC emacs-lisp
|
C |
1006 |
(defun get-verilog-latest()
|
0864ff
|
1007 |
(if (not(file-directory-p "~/.emacs.d/elpa/verilog-mode"))
|
C |
1008 |
(make-directory "~/.emacs.d/elpa/verilog-mode"))
|
|
1009 |
(if (file-exists-p "~/.emacs.d/elpa/verilog-mode/verilog-mode.el")
|
|
1010 |
(delete-file "~/.emacs.d/elpa/verilog-mode/verilog-mode.el"))
|
dc8eb0
|
1011 |
(url-copy-file "https://www.veripool.org/ftp/verilog-mode.el" "~/.emacs.d/elpa/verilog-mode/verilog-mode.el" 1))
|
baf326
|
1012 |
#+END_SRC
|
C |
1013 |
|
|
1014 |
**** Integrate into emacs
|
0ba1ff
|
1015 |
Add updated version (based off auto-package-update) and integrate it with Emacs.
|
990949
|
1016 |
#+BEGIN_SRC emacs-lisp
|
0864ff
|
1017 |
(defun verilog-read-file-as-string (file)
|
C |
1018 |
"Read FILE contents."
|
|
1019 |
(when (file-exists-p file)
|
|
1020 |
(with-temp-buffer
|
|
1021 |
(insert-file-contents file)
|
|
1022 |
(buffer-string))))
|
|
1023 |
|
|
1024 |
(defun verilog-write-string-to-file (file string)
|
|
1025 |
"Substitute FILE contents with STRING."
|
|
1026 |
(with-temp-buffer
|
|
1027 |
(insert string)
|
|
1028 |
(when (file-writable-p file)
|
|
1029 |
(write-region (point-min)
|
|
1030 |
(point-max)
|
|
1031 |
file))))
|
|
1032 |
|
|
1033 |
(defun verilog-today-day ()
|
|
1034 |
(time-to-days (current-time)))
|
|
1035 |
|
|
1036 |
(defun should-update-verilog-p ()
|
|
1037 |
"Return non-nil when an update is due."
|
|
1038 |
(and
|
|
1039 |
(or
|
|
1040 |
(not (file-exists-p "~/.emacs.d/.last-verilog-update-day"))
|
|
1041 |
(if (>= (/ (- (verilog-today-day) (verilog-read-last-update-day)) 7) 1)
|
|
1042 |
t
|
|
1043 |
nil))))
|
|
1044 |
|
|
1045 |
(defun verilog-read-last-update-day ()
|
|
1046 |
"Read last update day."
|
|
1047 |
(string-to-number
|
|
1048 |
(verilog-read-file-as-string "~/.emacs.d/.last-verilog-update-day")))
|
|
1049 |
|
|
1050 |
(defun verilog-write-current-day ()
|
|
1051 |
"Store current day."
|
|
1052 |
(verilog-write-string-to-file
|
|
1053 |
"~/.emacs.d/.last-verilog-update-day"
|
|
1054 |
(int-to-string (verilog-today-day))))
|
|
1055 |
|
|
1056 |
(use-package verilog-mode
|
|
1057 |
:init
|
|
1058 |
(when (should-update-verilog-p)
|
|
1059 |
(get-verilog-latest)
|
|
1060 |
(verilog-write-current-day))
|
|
1061 |
(add-to-list 'load-path "~/.emacs.d/elpa/verilog-mode/verilog-mode.el")
|
|
1062 |
:config
|
|
1063 |
(autoload 'verilog-mode "verilog-mode" "Verilog mode" t )
|
|
1064 |
(add-to-list 'auto-mode-alist '("\\.[ds]?vh?\\'" . verilog-mode)))
|
990949
|
1065 |
#+END_SRC
|
8a38cc
|
1066 |
|
0ba1ff
|
1067 |
*** COMMENT MATLAB
|
49aa9f
|
1068 |
Mode for editing MATLAB m-files.
|
JG |
1069 |
#+BEGIN_SRC emacs-lisp
|
0ba1ff
|
1070 |
(use-package matlab
|
JG |
1071 |
:ensure matlab-mode
|
|
1072 |
:config
|
|
1073 |
(autoload 'matlab-mode "matlab" "Matlab Editing Mode" t)
|
|
1074 |
(add-to-list
|
|
1075 |
'auto-mode-alist
|
|
1076 |
'("\\.m$" . matlab-mode))
|
|
1077 |
(setq matlab-indent-function t)
|
|
1078 |
(setq matlab-shell-command "matlab")
|
|
1079 |
(matlab-cedet-setup))
|
49aa9f
|
1080 |
#+END_SRC
|
JG |
1081 |
|
0ba1ff
|
1082 |
*** COMMENT MIPS
|
JG |
1083 |
For editing MIPS assembly.
|
49aa9f
|
1084 |
#+BEGIN_SRC emacs-lisp
|
JG |
1085 |
(use-package mips-mode
|
|
1086 |
:ensure t
|
|
1087 |
:mode "\\.mips$")
|
|
1088 |
#+END_SRC
|
|
1089 |
|
0ba1ff
|
1090 |
*** COMMENT IPython notebooks
|
60454d
|
1091 |
Allow emacs to view and use IPython notebooks
|
JG |
1092 |
#+BEGIN_SRC emacs-lisp
|
|
1093 |
(use-package ein
|
|
1094 |
:ensure t)
|
|
1095 |
#+END_SRC
|
|
1096 |
|
990949
|
1097 |
* Org mode
|
C |
1098 |
** Up to date org
|
0ba1ff
|
1099 |
Pull the latest org mode from the repository, rather than the org which comes with emacs.
|
990949
|
1100 |
#+BEGIN_SRC emacs-lisp
|
C |
1101 |
(use-package org
|
0ba1ff
|
1102 |
:ensure org-plus-contrib
|
990949
|
1103 |
:pin org)
|
C |
1104 |
#+END_SRC
|
8a38cc
|
1105 |
|
990949
|
1106 |
** Small tweaks
|
0ba1ff
|
1107 |
Small quality of life changes to org-mode.
|
990949
|
1108 |
#+BEGIN_SRC emacs-lisp
|
C |
1109 |
(setq org-src-fontify-natively t)
|
|
1110 |
(setq org-src-tab-acts-natively t)
|
|
1111 |
(setq org-confirm-babel-evaluate nil)
|
|
1112 |
(setq org-export-with-smart-quotes t)
|
|
1113 |
(setq org-src-window-setup 'current-window)
|
|
1114 |
(add-hook 'org-mode-hook 'org-indent-mode)
|
|
1115 |
(diminish 'org-indent-mode)
|
|
1116 |
(diminish 'visual-line-mode)
|
|
1117 |
#+END_SRC
|
8a38cc
|
1118 |
|
990949
|
1119 |
** Line wrapping
|
0ba1ff
|
1120 |
Enable line wrapping for long lines.
|
990949
|
1121 |
#+BEGIN_SRC emacs-lisp
|
C |
1122 |
(add-hook 'org-mode-hook
|
bf794a
|
1123 |
'(lambda ()
|
JG |
1124 |
(visual-line-mode 1)))
|
990949
|
1125 |
#+END_SRC
|
8a38cc
|
1126 |
|
990949
|
1127 |
** org-bullets
|
0ba1ff
|
1128 |
Use bullets of different colours and styles instead of the "\*\*\*" to denote indentation levels.
|
990949
|
1129 |
#+BEGIN_SRC emacs-lisp
|
bf794a
|
1130 |
(use-package org-bullets
|
JG |
1131 |
:ensure t
|
|
1132 |
:config
|
990949
|
1133 |
(add-hook 'org-mode-hook (lambda () (org-bullets-mode))))
|
C |
1134 |
#+END_SRC
|
8a38cc
|
1135 |
|
990949
|
1136 |
** Org Babel
|
0ba1ff
|
1137 |
Allows the execution of code from within an org buffer.
|
JG |
1138 |
Code output can also be input to the buffer.
|
990949
|
1139 |
*** Languages
|
0ba1ff
|
1140 |
Add a bunch of languages to org babel supported languages
|
990949
|
1141 |
#+BEGIN_SRC emacs-lisp
|
baf326
|
1142 |
(org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t)
|
C |
1143 |
(C . t)
|
|
1144 |
(python . t)
|
|
1145 |
(latex . t)
|
|
1146 |
(scheme . t)
|
|
1147 |
(gnuplot . t)
|
|
1148 |
(matlab . t)
|
|
1149 |
(plantuml . t)
|
|
1150 |
(fortran . t)
|
|
1151 |
(java . t)
|
|
1152 |
(plantuml . t)))
|
|
1153 |
#+END_SRC
|
|
1154 |
|
0ba1ff
|
1155 |
**** PlantUML path
|
JG |
1156 |
Org uses its own path for some reason.
|
baf326
|
1157 |
#+BEGIN_SRC emacs-lisp
|
C |
1158 |
(setq org-plantuml-jar-path plantuml-jar-path)
|
990949
|
1159 |
#+END_SRC
|
8a38cc
|
1160 |
|
990949
|
1161 |
** Latex preview fragments match colour
|
C |
1162 |
Make the previews match theme colour of Emacs.
|
0ba1ff
|
1163 |
Gets very annoying very quickly without it.
|
990949
|
1164 |
#+BEGIN_SRC emacs-lisp
|
C |
1165 |
(let ((dvipng--plist (alist-get 'dvipng org-preview-latex-process-alist)))
|
|
1166 |
(plist-put dvipng--plist :use-xcolor t)
|
|
1167 |
(plist-put dvipng--plist :image-converter '("dvipng -D %D -T tight -o %O %f")))
|
|
1168 |
#+END_SRC
|
bf794a
|
1169 |
|
0ba1ff
|
1170 |
** Org export additions
|
JG |
1171 |
*** Pandoc
|
|
1172 |
Call pandoc on org buffer from org export.
|
|
1173 |
#+BEGIN_SRC emacs-lisp
|
|
1174 |
(use-package ox-pandoc
|
|
1175 |
:ensure t)
|
|
1176 |
#+END_SRC
|
|
1177 |
|
|
1178 |
*** COMMENT Dokuwiki Wiki
|
|
1179 |
Allow export to dokuwiki markup from org.
|
|
1180 |
#+BEGIN_SRC emacs-lisp
|
|
1181 |
(use-package ox-wk
|
|
1182 |
:ensure t)
|
|
1183 |
#+END_SRC
|
|
1184 |
|
|
1185 |
* COMMENT EMMS
|
be9cff
|
1186 |
Emacs media manager.
|
0ba1ff
|
1187 |
I come back to it every now and again as an MPD front-end, but haven't quite gotten the hang of it.
|
be9cff
|
1188 |
#+BEGIN_SRC emacs-lisp
|
JG |
1189 |
(use-package emms-setup
|
|
1190 |
:ensure emms
|
|
1191 |
:init
|
|
1192 |
(add-to-list 'load-path "~/elisp/emms/")
|
|
1193 |
:config
|
|
1194 |
(emms-all)
|
|
1195 |
(emms-default-players)
|
|
1196 |
(setq emms-source-file-directory "~/Music/"))
|
|
1197 |
#+END_SRC
|
|
1198 |
|
|
1199 |
* Org Blog
|
0ba1ff
|
1200 |
I use org to write my blog and use org-static-blog to generate the HTML.
|
be9cff
|
1201 |
** Org static blog config
|
0ba1ff
|
1202 |
Basic configuration for site.
|
JG |
1203 |
Copied and modified from the example configuration.
|
be9cff
|
1204 |
#+BEGIN_SRC emacs-lisp
|
0ba1ff
|
1205 |
(use-package org-static-blog
|
JG |
1206 |
:ensure t
|
|
1207 |
:config
|
|
1208 |
(setq org-static-blog-publish-title "Joel's Site")
|
|
1209 |
(setq org-static-blog-publish-url "https://blog.joelg.cf/")
|
|
1210 |
(setq org-static-blog-publish-directory "/backup/home/joel/Downloads/Chizi123.github.io/")
|
|
1211 |
(setq org-static-blog-posts-directory "/backup/home/joel/Downloads/Chizi123.github.io/posts/")
|
|
1212 |
(setq org-static-blog-drafts-directory "/backup/home/joel/Downloads/Chizi123.github.io/drafts/")
|
|
1213 |
(setq org-static-blog-enable-tags t)
|
|
1214 |
(setq org-export-with-toc nil)
|
|
1215 |
(setq org-export-with-section-numbers nil)
|
be9cff
|
1216 |
|
0ba1ff
|
1217 |
;; This header is inserted into the <head> section of every page:
|
JG |
1218 |
;; (you will need to create the style sheet at
|
|
1219 |
;; ~/projects/blog/static/style.css
|
|
1220 |
;; and the favicon at
|
|
1221 |
;; ~/projects/blog/static/favicon.ico)
|
|
1222 |
(setq org-static-blog-page-header
|
|
1223 |
"<meta name=\"author\" content=\"Joel Grunbaum\">
|
|
1224 |
<meta name=\"referrer\" content=\"no-referrer\">
|
|
1225 |
<link href= \"static/style.css\" rel=\"stylesheet\" type=\"text/css\" />
|
|
1226 |
<link rel=\"icon\" href=\"static/favicon.png\">
|
|
1227 |
<script async src=\"https://www.googletagmanager.com/gtag/js?id=UA-147303155-2\"></script>
|
|
1228 |
<script>
|
|
1229 |
window.dataLayer = window.dataLayer || [];
|
|
1230 |
function gtag(){dataLayer.push(arguments);}
|
|
1231 |
gtag('js', new Date());
|
|
1232 |
gtag('config', 'UA-147303155-2');
|
|
1233 |
</script>
|
|
1234 |
")
|
be9cff
|
1235 |
|
0ba1ff
|
1236 |
;; This preamble is inserted at the beginning of the <body> of every page:
|
JG |
1237 |
;; This particular HTML creates a <div> with a simple linked headline
|
|
1238 |
(setq org-static-blog-page-preamble
|
|
1239 |
"<div class=\"header\">
|
|
1240 |
<a href=\"https://blog.joelg.cf\">Joel's Site - Personal site and constant work in progress</a>
|
|
1241 |
<div class=\"sitelinks\">
|
|
1242 |
<a href=\"https://blog.joelg.cf/about-me.html\">About Me</a> |
|
|
1243 |
<a href=\"https://github.com/Chizi123\">Github</a> |
|
|
1244 |
<a href=\"https://facebook.com/joel.grun.5\">Facebook</a>
|
|
1245 |
</div>
|
|
1246 |
</div>")
|
|
1247 |
|
|
1248 |
;; This postamble is inserted at the end of the <body> of every page:
|
|
1249 |
;; This particular HTML creates a <div> with a link to the archive page
|
|
1250 |
;; and a licensing stub.
|
|
1251 |
(setq org-static-blog-page-postamble
|
|
1252 |
"<div id=\"archive\">
|
|
1253 |
<a href=\"https://blog.joelg.cf/archive.html\">Other posts</a>
|
be9cff
|
1254 |
</div>
|
0ba1ff
|
1255 |
<br>
|
JG |
1256 |
<script data-isso=\"//commento.joelg.cf/\"
|
|
1257 |
src=\"//commento.joelg.cf/js/embed.min.js\"></script>
|
|
1258 |
<section id=\"isso-thread\"></section>")
|
|
1259 |
;; <center><button id=\"disqus_button\" onclick=\"load_disqus()\">Load Disqus Comments</button></center>
|
|
1260 |
;; <div id=\"disqus_thread\"></div>
|
|
1261 |
;; <script type=\"text/javascript\">
|
|
1262 |
;; function load_disqus() {
|
|
1263 |
;; var dsq = document.createElement('script');
|
|
1264 |
;; dsq.type = 'text/javascript';
|
|
1265 |
;; dsq.async = true;
|
|
1266 |
;; dsq.src = 'https://joelg-cf.disqus.com/embed.js';
|
|
1267 |
;; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
|
1268 |
;; document.getElementById('disqus_button').style.visibility = 'hidden';
|
|
1269 |
;; };
|
|
1270 |
;; </script>")
|
be9cff
|
1271 |
)
|
JG |
1272 |
#+END_SRC
|
|
1273 |
|
0ba1ff
|
1274 |
** Sitemap addition
|
JG |
1275 |
Creates a sitemap.xml for the blog based on the generated HTML files output in the final directory.
|
|
1276 |
#+BEGIN_SRC emacs-lisp
|
|
1277 |
(defun blog-publish()
|
|
1278 |
(interactive)
|
|
1279 |
(org-static-blog-publish)
|
|
1280 |
(setq n 0)
|
|
1281 |
(setq site "https://blog.joelg.cf/")
|
|
1282 |
(setq posts (directory-files org-static-blog-publish-directory))
|
|
1283 |
(generate-new-buffer "sitemap.xml.gen")
|
|
1284 |
(with-current-buffer "sitemap.xml.gen" (insert "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n"))
|
|
1285 |
(while (< n (length (directory-files org-static-blog-publish-directory)))
|
|
1286 |
(setq curr (nth n posts))
|
|
1287 |
(if (string-match "\\(html\\)" curr)
|
|
1288 |
(if (string-match "index.html" curr)
|
|
1289 |
(with-current-buffer "sitemap.xml.gen" (insert (concat "\t<url>\n\t\t<loc>" site "</loc>\n\t</url>\n")))
|
|
1290 |
(with-current-buffer "sitemap.xml.gen" (insert (concat "\t<url>\n\t\t<loc>" site curr "</loc>\n\t</url>\n")))))
|
|
1291 |
(setq n (1+ n)))
|
|
1292 |
(with-current-buffer "sitemap.xml.gen" (insert "</urlset>"))
|
|
1293 |
(with-current-buffer "sitemap.xml.gen" (write-region (point-min) (point-max) (concat org-static-blog-publish-directory "sitemap.xml")) t)
|
|
1294 |
(kill-buffer "sitemap.xml.gen"))
|
|
1295 |
#+END_SRC
|
|
1296 |
|
be9cff
|
1297 |
** Emacs-htmlize
|
0ba1ff
|
1298 |
Allow org features to be exported to HTML for site.
|
be9cff
|
1299 |
#+BEGIN_SRC emacs-lisp
|
JG |
1300 |
(use-package htmlize
|
|
1301 |
:ensure t)
|
|
1302 |
#+END_SRC
|
0ba1ff
|
1303 |
|