Start work on one-click workflows.

Commit
f4b99662172402beb919ae870b487048f357173c
Author
Blendoit <blendoit@gmail.com>
Author date
Committer
Blendoit <blendoit@gmail.com>
Committer date
Changed files
.gitignore
index 60078414..058ed0c8 100644..100644
@@ -19,3 +19,4 @@
19 19
20 20 # Misc
21 21 .org-id-locations
22 Added: async-bytecomp.log
README.org
index 18581448..159e6796 100644..100644
@@ -1,7 +1,7 @@
1 1 #+TITLE: GNU Emacs Configuration
2 2 #+AUTHOR: Marius Peter
3 Removed: #+DATE: <2020-07-23 Thu>
4 Removed: #+SETUPFILE: ~/org/templates/documents/personal.org
3 Added: #+DATE: <2020-10-13 Tue>
4 Added: #+SETUPFILE: ~/.emacs.d/templates/documents/general.org
5 5
6 6 * Installation
7 7
README.pdf
index 192f0b68..d7758b9b 100644..100644

Binary files differ

custom.el
index 00000000..0fdac6aa 000000..100644
@@ -0,0 +1,66 @@
1 Added: ;;; init-custom.el --- Where Emacs saves gui-settable customizations.
2 Added:
3 Added: ;;; Commentary:
4 Added:
5 Added: ;;; Code:
6 Added:
7 Added: (custom-set-variables
8 Added: ;; custom-set-variables was added by Custom.
9 Added: ;; If you edit it by hand, you could mess it up, so be careful.
10 Added: ;; Your init file should contain only one such instance.
11 Added: ;; If there is more than one, they won't work right.
12 Added: '(ansi-color-names-vector
13 Added: ["#3F3F3F" "#CC9393" "#7F9F7F" "#F0DFAF" "#8CD0D3" "#DC8CC3" "#93E0E3" "#DCDCCC"])
14 Added: '(company-quickhelp-color-background "#4F4F4F")
15 Added: '(company-quickhelp-color-foreground "#DCDCCC")
16 Added: '(custom-enabled-themes nil)
17 Added: '(custom-safe-themes
18 Added: '("8fb0949f4229860cf19034b924eb99c664327c9250fb92a2633bdf4b4abaf060" "c3a2a37e84e474c73c2b468553f9b5b73341419f72bbc1f4a4bcc1230ef86c85" "6495716176be0ced4142593b94a410135e0b373b686a869637824260d2f1ca11" "4467b1c8d7cc78fe98345c9c63eb62cf37844dc6868630add365494bde455715" "faeef63cb31f796b4bdf22f38e614934ab34d7deacaeb89b3e9cccf70aac5a85" "370fb305168fea1614535dc9ca30f496918eaca754b6c8969dd77fa872bec695" "e9f0c0c3397d07eb1c6c3551d67fd151e24bc6d72ec678841623ed572677c97a" "5c32236ef318adafe4102f627f330fa8f448046dfd838eef5cc09c7f682cf71f" "e343fecfb8d681186d594002c9b44ce48c2061599d7e4ec635cf1ca2a277a47a" "302dc61dc55600c7424f945dce9e74fba7df19f4a7bfb72aefd93193fa82ede4" "58f1f85248ba913387d1e7ed02a867161b315cfb5acff0c234e013ffd2577d22" "a256abf590bbc3257cc11d91a312e9fe8487dc1b95a5b7b732dd2f96a7fe5a45" "30368d6195cae9298304e6ac0534b90c85b1655965f1206c5c624270f0f46002" "311aa5df3223b5b4a7c638aad3befb4de9c7f46360d52acd1fa2cd2232b1dcbd" default))
19 Added: '(fci-rule-color "#383838")
20 Added: '(fringe-mode 0 nil (fringe))
21 Added: '(indicate-empty-lines t)
22 Added: '(line-number-mode t)
23 Added: '(message-required-headers '((optional . References) From))
24 Added: '(nrepl-message-colors
25 Added: '("#CC9393" "#DFAF8F" "#F0DFAF" "#7F9F7F" "#BFEBBF" "#93E0E3" "#94BFF3" "#DC8CC3"))
26 Added: '(org-agenda-diary-file "~/org/PERSONAL/diary/diary.org")
27 Added: '(org-agenda-files '("~/org/PERSONAL/diary/diary.org"))
28 Added: '(org-agenda-include-diary t)
29 Added: '(org-agenda-skip-scheduled-if-deadline-is-shown 'not-today)
30 Added: '(org-log-done 'time)
31 Added: '(org-startup-align-all-tables t)
32 Added: '(package-selected-packages
33 Added: '(dashboard undo-tree hungry-delete smooth-scroll smooth-scrolling delight yasnippet-snippets yasnippet org-sticky-header awesome-tab tabbar-ruler tabbar-mode linum-relative dumb-jump csv-mode rainbow-mode org-mouse projectile minimap gnuplot ledger-mode company-mode wombat-theme wombar-theme which-key srefactor-lisp srefactor all-the-icons flycheck ibuffer-sidebar pdf-tools magit rainbow-delimiters smartparens mixed-pitch org-bullets use-package tabbar powerline ivy-hydra flatui-theme evil counsel company benchmark-init))
34 Added: '(pdf-view-midnight-colors '("#DCDCCC" . "#383838"))
35 Added: '(save-place-mode t)
36 Added: '(send-mail-function 'smtpmail-send-it)
37 Added: '(smtpmail-smtp-server "smtp.gmail.com")
38 Added: '(smtpmail-smtp-service 587)
39 Added: '(vc-annotate-background "#2B2B2B")
40 Added: '(vc-annotate-color-map
41 Added: '((20 . "#BC8383")
42 Added: (40 . "#CC9393")
43 Added: (60 . "#DFAF8F")
44 Added: (80 . "#D0BF8F")
45 Added: (100 . "#E0CF9F")
46 Added: (120 . "#F0DFAF")
47 Added: (140 . "#5F7F5F")
48 Added: (160 . "#7F9F7F")
49 Added: (180 . "#8FB28F")
50 Added: (200 . "#9FC59F")
51 Added: (220 . "#AFD8AF")
52 Added: (240 . "#BFEBBF")
53 Added: (260 . "#93E0E3")
54 Added: (280 . "#6CA0A3")
55 Added: (300 . "#7CB8BB")
56 Added: (320 . "#8CD0D3")
57 Added: (340 . "#94BFF3")
58 Added: (360 . "#DC8CC3")))
59 Added: '(vc-annotate-very-old-color "#DC8CC3")
60 Added: '(window-divider-default-places t))
61 Added: (custom-set-faces
62 Added: ;; custom-set-faces was added by Custom.
63 Added: ;; If you edit it by hand, you could mess it up, so be careful.
64 Added: ;; Your init file should contain only one such instance.
65 Added: ;; If there is more than one, they won't work right.
66 Added: )
init-custom.el
index 3cbdb6ef..00000000 100644..000000
@@ -1,66 +0,0 @@
1 Removed: ;;; init-custom.el --- Where Emacs saves gui-settable customizations.
2 Removed:
3 Removed: ;;; Commentary:
4 Removed:
5 Removed: ;;; Code:
6 Removed:
7 Removed: (custom-set-variables
8 Removed: ;; custom-set-variables was added by Custom.
9 Removed: ;; If you edit it by hand, you could mess it up, so be careful.
10 Removed: ;; Your init file should contain only one such instance.
11 Removed: ;; If there is more than one, they won't work right.
12 Removed: '(ansi-color-names-vector
13 Removed: ["#3F3F3F" "#CC9393" "#7F9F7F" "#F0DFAF" "#8CD0D3" "#DC8CC3" "#93E0E3" "#DCDCCC"])
14 Removed: '(company-quickhelp-color-background "#4F4F4F")
15 Removed: '(company-quickhelp-color-foreground "#DCDCCC")
16 Removed: '(custom-enabled-themes nil)
17 Removed: '(custom-safe-themes
18 Removed: '("6495716176be0ced4142593b94a410135e0b373b686a869637824260d2f1ca11" "4467b1c8d7cc78fe98345c9c63eb62cf37844dc6868630add365494bde455715" "faeef63cb31f796b4bdf22f38e614934ab34d7deacaeb89b3e9cccf70aac5a85" "370fb305168fea1614535dc9ca30f496918eaca754b6c8969dd77fa872bec695" "e9f0c0c3397d07eb1c6c3551d67fd151e24bc6d72ec678841623ed572677c97a" "5c32236ef318adafe4102f627f330fa8f448046dfd838eef5cc09c7f682cf71f" "e343fecfb8d681186d594002c9b44ce48c2061599d7e4ec635cf1ca2a277a47a" "302dc61dc55600c7424f945dce9e74fba7df19f4a7bfb72aefd93193fa82ede4" "58f1f85248ba913387d1e7ed02a867161b315cfb5acff0c234e013ffd2577d22" "a256abf590bbc3257cc11d91a312e9fe8487dc1b95a5b7b732dd2f96a7fe5a45" "30368d6195cae9298304e6ac0534b90c85b1655965f1206c5c624270f0f46002" "311aa5df3223b5b4a7c638aad3befb4de9c7f46360d52acd1fa2cd2232b1dcbd" default))
19 Removed: '(fci-rule-color "#383838")
20 Removed: '(fringe-mode 0 nil (fringe))
21 Removed: '(indicate-empty-lines t)
22 Removed: '(line-number-mode t)
23 Removed: '(message-required-headers '((optional . References) From))
24 Removed: '(nrepl-message-colors
25 Removed: '("#CC9393" "#DFAF8F" "#F0DFAF" "#7F9F7F" "#BFEBBF" "#93E0E3" "#94BFF3" "#DC8CC3"))
26 Removed: '(org-agenda-diary-file "~/org/PERSONAL/diary/diary.org")
27 Removed: '(org-agenda-files '("~/org/PERSONAL/diary/diary.org"))
28 Removed: '(org-agenda-include-diary t)
29 Removed: '(org-agenda-skip-scheduled-if-deadline-is-shown 'not-today)
30 Removed: '(org-log-done 'time)
31 Removed: '(org-startup-align-all-tables t)
32 Removed: '(package-selected-packages
33 Removed: '(hungry-delete smooth-scroll smooth-scrolling delight yasnippet-snippets yasnippet org-sticky-header awesome-tab tabbar-ruler tabbar-mode linum-relative dumb-jump csv-mode rainbow-mode org-mouse projectile minimap gnuplot ledger-mode company-mode wombat-theme wombar-theme which-key srefactor-lisp srefactor all-the-icons flycheck ibuffer-sidebar pdf-tools magit rainbow-delimiters smartparens mixed-pitch org-bullets use-package tabbar powerline ivy-hydra flatui-theme evil counsel company benchmark-init))
34 Removed: '(pdf-view-midnight-colors '("#DCDCCC" . "#383838"))
35 Removed: '(save-place-mode t)
36 Removed: '(send-mail-function 'smtpmail-send-it)
37 Removed: '(smtpmail-smtp-server "smtp.gmail.com")
38 Removed: '(smtpmail-smtp-service 587)
39 Removed: '(vc-annotate-background "#2B2B2B")
40 Removed: '(vc-annotate-color-map
41 Removed: '((20 . "#BC8383")
42 Removed: (40 . "#CC9393")
43 Removed: (60 . "#DFAF8F")
44 Removed: (80 . "#D0BF8F")
45 Removed: (100 . "#E0CF9F")
46 Removed: (120 . "#F0DFAF")
47 Removed: (140 . "#5F7F5F")
48 Removed: (160 . "#7F9F7F")
49 Removed: (180 . "#8FB28F")
50 Removed: (200 . "#9FC59F")
51 Removed: (220 . "#AFD8AF")
52 Removed: (240 . "#BFEBBF")
53 Removed: (260 . "#93E0E3")
54 Removed: (280 . "#6CA0A3")
55 Removed: (300 . "#7CB8BB")
56 Removed: (320 . "#8CD0D3")
57 Removed: (340 . "#94BFF3")
58 Removed: (360 . "#DC8CC3")))
59 Removed: '(vc-annotate-very-old-color "#DC8CC3")
60 Removed: '(window-divider-default-places t))
61 Removed: (custom-set-faces
62 Removed: ;; custom-set-faces was added by Custom.
63 Removed: ;; If you edit it by hand, you could mess it up, so be careful.
64 Removed: ;; Your init file should contain only one such instance.
65 Removed: ;; If there is more than one, they won't work right.
66 Removed: )
init.el
index 81157c0b..695891bb 100644..100644
@@ -6,17 +6,15 @@
6 6 ;;; Code:
7 7
8 8 ;; First of all, we indicate the path to our literate configuration file.
9 Removed: (setq my/literate-config (concat user-emacs-directory "smart-documents.org"))
9 Added: (setq my/literate-config (concat user-emacs-directory "smart-documents"))
10 10
11 11 ;; Emacs will startup faster next time, because it will load
12 12 ;; a byte-compiled version of our literate configuration file.
13 Removed: (cond ((file-exists-p (concat (file-name-sans-extension my/literate-config) ".elc"))
14 Removed: (load (concat (file-name-sans-extension my/literate-config) ".elc")))
15 Removed: ((file-exists-p (concat (file-name-sans-extension my/literate-config) ".el"))
16 Removed: (load (concat (file-name-sans-extension my/literate-config) ".el")))
17 Removed: ((file-exists-p my/literate-config)
18 Removed: (org-babel-load-file my/literate-config))
19 Removed: (t (message "There appears to be no literate configuration file. Reinstall?")))
13 Added: (cond ((file-exists-p (concat my/literate-config ".el"))
14 Added: (load my/literate-config))
15 Added: ((file-exists-p (concat my/literate-config ".org"))
16 Added: (org-babel-load-file (concat my/literate-config ".org")))
17 Added: (t (message "No literate configuration file detected.")))
20 18
21 19 (provide 'init)
22 20
smart-documents.org
index f62c39dd..eb7097a8 100644..100644
@@ -11,18 +11,25 @@
11 11 # By default, Org Babel does not tangle blocks.
12 12 #+PROPERTY: header-args :tangle yes
13 13
14 Added: # Beautiful font pairing
14 15 #+LATEX_HEADER: \setmainfont{urw gothic}
16 Added: #+LATEX_HEADER: \setmonofont{hermit}
15 17
16 18 #+LATEX: \begin{abstract}
17 19 The idea of /Smart Documents/ came to me as I was reflecting on how to improve
18 Removed: the document production process in my workplace. I really wanted to improve the
19 Removed: way we produced documents.
20 Removed:
20 Added: the document creation process in my workplace. The GNU Emacs editor had
21 Added: captured my imagination and I wanted to create an accessible and highly
22 Added: productive text editor to benefit my organization. In this paper, I'll lay out
23 Added: my vision for the /Smart Document/, a file containing both text destined to the
24 Added: reader, and code describing how to update, validate, and present this text;
25 Added: then, I'll weave my personal GNU Emacs customizations with a tutorial. This
26 Added: paper is a /Smart Document/ itself!
21 27 #+LATEX: \end{abstract}
22 28
23 29 * Introduction
24 30
25 Removed: GNU Emacs is most often used as a text editor. The utmost level of
31 Added: GNU Emacs is most often used as a text editor. It would be unfair to say it is
32 Added: just that, because Emacs is capable of so much more. The utmost level of
26 33 customization is afforded by enabling the user to rewrite /any/ part of the
27 34 source code and observe the editor's modified behaviour in real time. Since its
28 35 inception in 1984, GNU Emacs has grown to be much more than a full-featured,
@@ -41,25 +48,37 @@
41 48 detailed steps Emacs takes upon starting, refer to
42 49 [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html]].]
43 50
44 Removed: Customizing Emacs goes far, far beyond this document---feel free to experiment
45 Removed: and discover. Here are three commands that will help you understand all the
46 Removed: symbols in this file, if you are browsing this paper within Emacs itself:
51 Added: Customizing Emacs goes far, far beyond rewriting sections of this
52 Added: document---feel free to experiment and discover. Here are three commands that
53 Added: will help you understand all the symbols in this file, if you are browsing this
54 Added: paper within Emacs itself:
47 55
48 56 - ~C-h f~ describe function
49 57 - ~C-h v~ describe variable
50 58 - ~C-h k~ describe key
51 59
52 Removed: When Emacs first starts up, it looks for the following files in order and
53 Removed: attempts to load the contents of the first existing file. From the manual:
54 Removed:
55 60 * TODO First-time setup
56 61
62 Added: The following code blocks are normally evaluated once---upon starting Emacs for
63 Added: the first time.
64 Added:
57 65 ** TODO User details
58 66
59 Removed: The advantage of working with /Smart Documents/ is that they can automatically
67 Added: One advantage of working with /Smart Documents/ is that they can automatically
60 68 be populated with our details in the header, footer, or other appropriate
61 69 element.
62 70
71 Added: #+NAME: user-details-get
72 Added: #+BEGIN_SRC emacs-lisp
73 Added: (defun my/user-details-get ()
74 Added: "Get user details."
75 Added: (setq user-full-name (read-string "Enter full user name:"))
76 Added: (setq user-mail-address (read-string "Enter user e-mail address:"))
77 Added: (message "Successfully captured user details."))
78 Added: #+END_SRC
79 Added:
80 Added:
81 Added:
63 82 #+NAME: user-details
64 83 #+BEGIN_SRC emacs-lisp
65 84 (defun my/tokenize-user-details ()
@@ -69,8 +88,7 @@
69 88
70 89 (unless (file-exists-p (concat user-emacs-directory
71 90 "meta/user-details"))
72 Removed: (setq user-full-name (read-string "Enter full user name:"))
73 Removed: (setq user-mail-address (read-string "Enter user e-mail address:"))
91 Added:
74 92 (setq user-details '(user-full-name
75 93 user-mail-address))
76 94 (append-to-file "Foobar\n" nil "~/.emacs.d/meta/foobar"))
@@ -90,7 +108,7 @@
90 108
91 109 * Early setup
92 110
93 Removed: ** The first file to load, =early-init.el=
111 Added: ** The first file to load
94 112
95 113 This is the very first user-editable file loaded by Emacs.[fn::This feature
96 114 became available in version 27.1.] In it, we disable GUI elements that would
@@ -115,7 +133,7 @@
115 133 (my/create-early-init-file))
116 134 #+END_SRC
117 135
118 Removed: ** The second file to load, =init.el=
136 Added: ** The second file to load
119 137
120 138 #+BEGIN_QUOTE
121 139 Traditionally, file =~/.emacs= is used as the init file, although Emacs also
@@ -163,31 +181,20 @@
163 181 ; (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
164 182 #+END_SRC
165 183
166 Removed: ** Customization shortcuts
184 Added: ** Jumping to this file
167 185
168 Removed: We begin by defining a user shortcut to this very file. We load this as early as
169 Removed: possible, this facilitates debugging.
186 Added: We begin by defining a function to open this very file.
170 187
171 188 #+NAME: shortcut-config
172 189 #+BEGIN_SRC emacs-lisp
173 190 (defun my/find-literate-config ()
174 191 "Jump to this very file."
175 192 (interactive)
176 Removed: (find-file my/literate-config))
177 Removed:
178 Removed: (global-set-key (kbd "C-c c") 'my/find-literate-config)
193 Added: (find-file (concat my/literate-config ".org")))
179 194 #+END_SRC
180 195
181 Removed: Now, different shortcuts for other customization actions:
196 Added: ** Meta-files
182 197
183 Removed: #+NAME: shortcuts-customization
184 Removed: #+BEGIN_SRC emacs-lisp
185 Removed: (global-set-key (kbd "C-c v") 'customize-variable)
186 Removed: (global-set-key (kbd "C-c f") 'customize-face)
187 Removed: #+END_SRC
188 Removed:
189 Removed: ** Locations
190 Removed:
191 198 In this section, we'll be tidying up the =.emacs.d/= directory---by default,
192 199 many Emacs packages create files useful for themselves in our
193 200 ~user-emacs-directory~. This leads to undesirable clutter. Certain packages
@@ -202,18 +209,6 @@
202 209 (setq my/meta-files-location (concat user-emacs-directory "meta/"))
203 210 #+END_SRC
204 211
205 Removed: *** Custom file
206 Removed:
207 Removed: Load settings created automatically by GNU Emacs Custom. (For example, any
208 Removed: clickable option/toggle is saved here.) Useful for fooling around with ~M-x
209 Removed: customize-group <package>~.
210 Removed:
211 Removed: #+NAME: custom-file-location
212 Removed: #+BEGIN_SRC emacs-lisp
213 Removed: (setq custom-file (concat user-emacs-directory "init-custom.el"))
214 Removed: (load custom-file)
215 Removed: #+END_SRC
216 Removed:
217 212 *** Recently visited files
218 213
219 214 #+BEGIN_SRC emacs-lisp
@@ -238,10 +233,21 @@
238 233 "places"))
239 234 #+END_SRC
240 235
236 Added: *** Custom file
237 Added:
238 Added: Load settings created automatically by GNU Emacs Custom. (For example, any
239 Added: clickable option/toggle is saved here.) Useful for fooling around with ~M-x
240 Added: customize-group <package>~.
241 Added:
242 Added: #+NAME: custom-file-location
243 Added: #+BEGIN_SRC emacs-lisp
244 Added: (setq custom-file (concat user-emacs-directory "custom.el"))
245 Added: (load custom-file)
246 Added: #+END_SRC
247 Added:
241 248 ** Backups
242 249
243 Removed: Backups are so important that they should be described right after the shortcut
244 Removed: to this file.
250 Added: Backups are very important!
245 251
246 252 #+BEGIN_SRC emacs-lisp
247 253 (setq backup-directory-alist `((".*" . ,temporary-file-directory))
@@ -279,7 +285,7 @@
279 285
280 286 ** Secrets
281 287
282 Removed: The code containe din the =secrets.org= file is loaded by Emacs, but not
288 Added: The code contained in the =secrets.org= file is loaded by Emacs, but not
283 289 rendered in this PDF for the sake of privacy. It contains individually
284 290 identifying information such as names and e-mail addresses, which are used to
285 291 populate Org templates (Section [[~org-mode~]]). You need to create this
@@ -289,52 +295,92 @@
289 295 (org-babel-load-file "~/.emacs.d/secrets.org")
290 296 #+END_SRC
291 297
292 Removed: * Global key bindings
298 Added: * Keyboard shortcuts
293 299
294 300 The following bindings strive to further enhance CUA mode.[fn::Common User
295 301 Access. This is a term coined by IBM which has influenced user navigation cues
296 Removed: on all modern desktop OSes. From IBM's CUA, we get the =Ctrl-v= and =Ctrl-v=
302 Added: on all modern desktop OSes. From IBM's CUA, we get the =Ctrl-c= and =Ctrl-v=
297 303 keyboard shortcuts.]
298 304
299 305 #+BEGIN_SRC emacs-lisp
300 306 (cua-mode)
301 307 #+END_SRC
302 308
303 Removed: ** Keyboard navigation
309 Added: What follows are the most useful keybindings, as well as the keybindings to the
310 Added: functions we defined ourselves. It doesn't matter if we haven't defined the
311 Added: functions themselves yet; Emacs will accept a keybinding for any symbol and
312 Added: does not check if the symbol's function definition exists, until the keybinding
313 Added: is pressed.
304 314
305 Removed: *** Saving a file
315 Added: ** Files
306 316
317 Added: *** Save a file
318 Added:
307 319 #+BEGIN_SRC emacs-lisp
308 320 (global-set-key (kbd "C-s") 'save-buffer)
309 321 #+END_SRC
310 322
311 Removed: *** Opening a file
323 Added: *** Open a file
312 324
313 325 #+BEGIN_SRC emacs-lisp
314 326 (global-set-key (kbd "C-o") 'find-file)
315 327 #+END_SRC
316 328
317 Removed: *** Opening a recently visited file
329 Added: *** List open files
318 330
319 331 #+BEGIN_SRC emacs-lisp
320 Removed: (global-set-key (kbd "C-r") 'counsel-recentf)
332 Added: (global-set-key (kbd "C-b") 'ivy-switch-buffer)
321 333 #+END_SRC
322 334
323 Removed: *** Make only window
335 Added: *** Open this very file
324 336
337 Added: (Function defined in Section [[Jumping to this file]])
338 Added:
325 339 #+BEGIN_SRC emacs-lisp
326 Removed: (global-set-key (kbd "C-`") 'delete-other-windows)
340 Added: (global-set-key (kbd "C-c c") 'my/find-literate-config)
327 341 #+END_SRC
328 342
329 Removed: *** Locating a file
343 Added: *** Open a recently visited file
330 344
331 345 #+BEGIN_SRC emacs-lisp
346 Added: (global-set-key (kbd "C-r") 'counsel-recentf)
347 Added: #+END_SRC
348 Added:
349 Added: *** Locate a file
350 Added:
351 Added: #+BEGIN_SRC emacs-lisp
332 352 (global-set-key (kbd "C-c l") 'counsel-locate)
333 353 #+END_SRC
334 354
335 Removed: *** Closing window and quitting Emacs
355 Added: *** Open the agenda
336 356
337 357 #+BEGIN_SRC emacs-lisp
358 Added: (global-set-key (kbd "C-c a") 'org-agenda-list)
359 Added: #+END_SRC
360 Added:
361 Added: *** Open the diary
362 Added:
363 Added: #+BEGIN_SRC emacs-lisp
364 Added: (global-set-key (kbd "C-c d") 'my/find-diary-file)
365 Added: #+END_SRC
366 Added:
367 Added: ** Windows
368 Added:
369 Added: *** Make new window
370 Added:
371 Added: #+BEGIN_SRC emacs-lisp
372 Added: (global-set-key (kbd "C-n") 'make-frame)
373 Added: #+END_SRC
374 Added:
375 Added: *** Make only window
376 Added:
377 Added: #+BEGIN_SRC emacs-lisp
378 Added: (global-set-key (kbd "C-`") 'delete-other-windows)
379 Added: #+END_SRC
380 Added:
381 Added: *** Close window and quit
382 Added:
383 Added: #+BEGIN_SRC emacs-lisp
338 384 (defun my/delete-window-or-previous-buffer ()
339 385 "Delete window; if sole window, previous buffer."
340 386 (interactive)
@@ -350,8 +396,10 @@
350 396 (global-set-key (kbd "C-q") 'save-buffers-kill-terminal)
351 397 #+END_SRC
352 398
353 Removed: ** Mouse zoom
399 Added: ** Text display
354 400
401 Added: *** Zoom
402 Added:
355 403 The typical binding on both GNU/Linux and MS Windows is adequate here: ~C-=~ to
356 404 zoom in, ~C--~ to zoom out.
357 405
@@ -363,6 +411,50 @@
363 411 (global-set-key (kbd "C-+") 'text-scale-increase)
364 412 #+END_SRC
365 413
414 Added: *** Select all the text
415 Added:
416 Added: CUA, CUA, CUA, always & forever.
417 Added:
418 Added: #+BEGIN_SRC emacs-lisp
419 Added: (global-set-key (kbd "C-a") 'mark-whole-buffer)
420 Added: #+END_SRC
421 Added:
422 Added: ** Customizing the editor
423 Added:
424 Added: *** Customize a variable
425 Added:
426 Added: #+BEGIN_SRC emacs-lisp
427 Added: (global-set-key (kbd "C-c v") 'customize-variable)
428 Added: #+END_SRC
429 Added:
430 Added: *** Customize a face
431 Added:
432 Added: #+BEGIN_SRC emacs-lisp
433 Added: (global-set-key (kbd "C-c f") 'customize-face)
434 Added: #+END_SRC
435 Added:
436 Added: ** TODO One-click workflows
437 Added:
438 Added: A major advantage of the Emacs document production system: arbitrarily
439 Added: complicated functions can be assigned to very simple keybindings. This means we
440 Added: can automate workflows up to a pretty absurd level.
441 Added:
442 Added: *** Export to PDF
443 Added:
444 Added: PDF is probably the most prevalent file format for sharing static documents.
445 Added:
446 Added: **** document
447 Added:
448 Added: #+BEGIN_SRC emacs-lisp
449 Added: (global-set-key (kbd "C-p") 'my/org-quick-export)
450 Added: #+END_SRC
451 Added:
452 Added: **** TODO presentation
453 Added:
454 Added: #+BEGIN_SRC emacs-lisp
455 Added:
456 Added: #+END_SRC
457 Added:
366 458 * Packages
367 459
368 460 Packages are collections of =.el= files providing added functionality to Emacs.
@@ -470,6 +562,9 @@
470 562 (ledger . t)
471 563 (gnuplot . t)
472 564 (latex . t)))
565 Added:
566 Added: (org-babel-do-load-languages
567 Added: 'org-babel-load-languages '((C . t) (shell . t) (gnuplot . t)))
473 568 #+END_SRC
474 569
475 570 *** Prevent or warn on invisible edits
@@ -485,14 +580,10 @@
485 580 =org-time-stamp= can be inserted with ~C-c .~ (period)]
486 581
487 582 #+BEGIN_SRC emacs-lisp
488 Removed: (global-set-key (kbd "C-c a") 'org-agenda-list)
489 Removed:
490 Removed: (defun my/find-diary-file ()
491 Removed: "Load `org-agenda-diary-file'."
492 Removed: (interactive)
493 Removed: (find-file org-agenda-diary-file))
494 Removed:
495 Removed: (global-set-key (kbd "C-c d") 'my/find-diary-file)
583 Added: (defun my/find-diary-file ()
584 Added: "Load `org-agenda-diary-file'."
585 Added: (interactive)
586 Added: (find-file org-agenda-diary-file))
496 587 #+END_SRC
497 588
498 589 *** Timestamps
@@ -621,26 +712,9 @@
621 712 (setq org-latex-toc-command "\\tableofcontents\\clearpage")
622 713 #+END_SRC
623 714
624 Removed:
625 Removed:
626 715 The following makes =TODO= items appear red and =CLOSED= items appear green in
627 716 Org's LaTeX exports. Very stylish, much flair!
628 717
629 Removed: *** TODO Export
630 Removed:
631 Removed: This creates a shorter binding for the most common Org export: Org \rightarrow
632 Removed: LaTeX \rightarrow PDF.
633 Removed:
634 Removed: #+BEGIN_SRC emacs-lisp
635 Removed: (defun my/org-quick-export ()
636 Removed: "Org async export to PDF and open.
637 Removed: This basically reimplements `C-c C-e C-a l o'."
638 Removed: (interactive)
639 Removed: (org-open-file (org-latex-export-to-pdf)))
640 Removed:
641 Removed: (global-set-key (kbd "C-c e") 'my/org-quick-export)
642 Removed: #+END_SRC
643 Removed:
644 718 ** TODO ~evil-mode~
645 719
646 720 Forgive me, for I have sinned.
@@ -660,9 +734,10 @@
660 734 The following customizations open the doors to vastly increased typing speed
661 735 and accuracy.
662 736
663 Removed: *** ~flycheck~
737 Added: *** Syntax checking
664 738
665 Removed: Syntax highlighting for Emacs.
739 Added: We require a package to highlight syntax errors and warnings. The ~flycheck~
740 Added: package ensures we are aware of all our code's syntactical shortcomings.
666 741
667 742 #+NAME: flycheck
668 743 #+BEGIN_SRC emacs-lisp
@@ -670,7 +745,7 @@
670 745 (global-flycheck-mode)
671 746 #+END_SRC
672 747
673 Removed: *** TODO ~flyspell~
748 Added: *** Spelling
674 749
675 750 #+NAME: flyspell
676 751 #+BEGIN_SRC emacs-lisp
@@ -680,18 +755,21 @@
680 755
681 756 *** Insert template from keyword
682 757
683 Removed: Thanks to yasnippet, we can type certain keywords, press =TAB=, and this will
684 Removed: automatically insert a text snippet. We may then navigate through the snippet
685 Removed: by using =TAB= (next field) and =SHIFT-TAB= (previous field).
758 Added: Thanks to ~yasnippet~, we can type certain keywords, then press =TAB=, to
759 Added: automatically insert a predefined text snippet. We can then navigate through
760 Added: the snippet by using =<tab>= (next field) and =<backtab>= (previous
761 Added: field).[fn::=<backtab>= is synonymous with pressing shift-tab.]
686 762
687 Removed: For instance: Typing =src= then pressing =TAB= will expand the keyword to the
763 Added: For instance: typing =src= then pressing =TAB= will expand the keyword to the
688 764 following text:
689 765
690 766 : #+BEGIN_SRC emacs-lisp
691 767 :
692 768 : #+END_SRC
693 769
694 Removed: We notice that emacs-lisp is highlighted---this is the first modifiable field.
770 Added: We notice that emacs-lisp is highlighted---this is the first modifiable
771 Added: field. Many clever programming tricks can be performed with ~yasnippet~ to save
772 Added: us a ton of time with boilerplate text!
695 773
696 774 #+NAME: yasnippet
697 775 #+BEGIN_SRC emacs-lisp
@@ -746,6 +824,10 @@
746 824
747 825 *** Jump to symbol's definition
748 826
827 Added: ~dumb-jump~ is a reliable symbol definition finder. It uses different matching
828 Added: algorithms and heuristics to provide a very educated guess on the location of a
829 Added: symbol's definition.
830 Added:
749 831 #+BEGIN_SRC emacs-lisp
750 832 (use-package dumb-jump)
751 833 (add-hook 'xref-backend-functions #'dumb-jump-xref-activate)
@@ -898,9 +980,26 @@
898 980 (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))))
899 981 #+END_SRC
900 982
983 Added: * One-click workflows
984 Added:
985 Added: In this section, we'll implement useful one-click workflows.
986 Added:
987 Added: *** TODO Export dialogue
988 Added:
989 Added: This reimplements the most common Org mode export: Org \rightarrow LaTeX
990 Added: \rightarrow PDF. The binding is defined in Section [[Export to PDF]].
991 Added:
992 Added: #+BEGIN_SRC emacs-lisp
993 Added: (defun my/org-quick-export ()
994 Added: "Org async export to PDF and open.
995 Added: This basically reimplements `C-c C-e C-a l o'."
996 Added: (interactive)
997 Added: (org-open-file (org-latex-export-to-pdf)))
998 Added: #+END_SRC
999 Added:
901 1000 * Editing preferences
902 1001
903 Removed: These customizations enhance editor usability. They are not brought about
1002 Added: These customizations enhance editor usability.
904 1003
905 1004 ** Editor
906 1005
@@ -916,7 +1015,7 @@
916 1015 *** Recent files
917 1016
918 1017 The keybinding for opening a recently visited file is described in paragraph
919 Removed: [[Opening a recently visited file]].
1018 Added: [[Open a recently visited file]].
920 1019
921 1020 #+BEGIN_SRC emacs-lisp
922 1021 (recentf-mode 1)
@@ -988,7 +1087,7 @@
988 1087
989 1088 * Themes
990 1089
991 Removed: Without a carefully designed theme, our editor could become unusable. Thus, we
1090 Added: Without a carefully designed theme, our editor would become unusable. Thus, we
992 1091 describe two themes that were developed purposefully and iteratively.
993 1092
994 1093 #+BEGIN_SRC emacs-lisp
@@ -1085,15 +1184,15 @@
1085 1184 is to prepare for the next startup, interrupt our profiling activities, and
1086 1185 smartly store the result of our profiling.
1087 1186
1088 Removed: ** TODO Speeding up the next startup
1187 Added: ** Speeding up the next startup
1089 1188
1090 1189 #+BEGIN_SRC emacs-lisp
1091 1190 (defun byte-compile-literate-config ()
1092 1191 "Byte compile our literate configuration file."
1093 Removed: (delete-file (concat (file-name-sans-extension my/literate-config) ".elc"))
1094 Removed: (org-babel-tangle-file my/literate-config)
1095 Removed: (byte-compile-file (concat (file-name-sans-extension my/literate-config) ".el"))
1096 Removed: (message "c'mon work fucker"))
1192 Added: (delete-file (concat my/literate-config ".elc"))
1193 Added: (delete-file (concat my/literate-config ".el"))
1194 Added: (org-babel-tangle-file (concat my/literate-config ".org"))
1195 Added: (byte-compile-file (concat my/literate-config ".el")))
1097 1196
1098 1197 (add-hook 'kill-emacs-hook 'byte-compile-literate-config)
1099 1198 #+END_SRC
smart-documents.pdf
index e9b8cece..2846f9c7 100644..100644

Binary files differ

templates/documents/general.org
index 4d51867b..4a3cc566 100644..100644
@@ -16,8 +16,8 @@
16 16 #+LATEX_HEADER: \usepackage{lastpage}
17 17 #+LATEX_HEADER: \usepackage{titling}
18 18
19 Removed: #+LATEX_HEADER: \usepackage{enumitem}
20 Removed: #+LATEX_HEADER: \setlist{noitemsep}
19 Added: # #+LATEX_HEADER: \usepackage{enumitem}
20 Added: # #+LATEX_HEADER: \setlist{noitemsep}
21 21
22 22 # Required to reset numbering of table rows from table to table.
23 23 #+LATEX_HEADER: \usepackage{etoolbox}
themes/blendoit-light-theme.el
index a2e8be18..3ba01543 100644..100644
@@ -1,5 +1,5 @@
1 1 (deftheme blendoit-light
2 Removed: "Created 2020-10-05.")
2 Added: "Created 2020-10-10.")
3 3
4 4 (custom-theme-set-faces
5 5 'blendoit-light
@@ -76,7 +76,7 @@
76 76 '(org-checkbox ((t (:weight bold :inherit org-meta-line))))
77 77 '(org-todo ((t (:background "tomato" :foreground "White" :weight bold :height 1.2 :family "Hermit"))))
78 78 '(org-done ((t (:background "ForestGreen" :foreground "White" :weight bold :height 1.2 :family "Hermit"))))
79 Removed: '(org-date ((t (:inherit org-tag))))
79 Added: '(org-date ((t (:foreground "steel blue" :family "Hermit"))))
80 80 '(Info-quoted ((t (:inherit org-block))))
81 81 '(org-priority ((t (:weight bold :inherit org-meta-line))))
82 82 '(powerline-active1 ((t (:inherit mode-line :background "grey17" :foreground "white" :family "Hack"))))