Edward Liu

Commit
eed187911ed77f7cdd9b77006388b0d12421bca6
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
Changed files
bookmarks
index 00000000..fec276d4 000000..100644
@@ -0,0 +1,10 @@
1 Added: ;;;; Emacs Bookmark Format Version 1 ;;;; -*- coding: utf-8-emacs -*-
2 Added: ;;; This format is meant to be slightly human-readable;
3 Added: ;;; nevertheless, you probably don't want to edit it.
4 Added: ;;; -*- End Of Bookmark File Format Version Stamp -*-
5 Added: (("org-capture-last-stored"
6 Added: (filename . "~/.emacs.d/resources/org/default-notes.org")
7 Added: (front-context-string . "** TODO Do this\n")
8 Added: (rear-context-string)
9 Added: (position . 9))
10 Added: )
resources/org/default-notes.org
index 00000000..01cebcbf 000000..100644
@@ -0,0 +1,3 @@
1 Added: * Tasks
2 Added: ** TODO Do this
3 Added: [2021-10-06 Wed]
resources/templates/documents/letter-default.setup
index f2979935..515df1be 100644..100644
@@ -1,21 +1,33 @@
1 1 # -*- mode: org; eval: (visual-line-mode); -*-
2 2
3 Added: * Document options
4 Added:
3 5 #+OPTIONS: title:nil
4 6
7 Added: * LaTeX
8 Added:
9 Added: ** Document class
5 10 #+LATEX_CLASS: letter
6 11
7 12 # Ensure room for header and footer
8 Removed: #+LATEX_HEADER: \usepackage{geometry}[
9 Removed: #+LATEX_HEADER: left = 1in ,
10 Removed: #+LATEX_HEADER: right = 1in ,
11 Removed: #+LATEX_HEADER: top = 1in ,
12 Removed: #+LATEX_HEADER: bottom = 1in ,]
13 Added: # +LATEX_HEADER: \usepackage{geometry}[
14 Added: # +LATEX_HEADER: left = 1in ,
15 Added: # +LATEX_HEADER: right = 1in ,
16 Added: # +LATEX_HEADER: top = 1in ,
17 Added: # +LATEX_HEADER: bottom = 1in ,]
13 18
14 Removed: # Beautiful fonts ONLY
19 Added: ** Fonts
20 Added:
21 Added: Beautiful fonts ONLY!
22 Added:
15 23 #+LATEX_HEADER: \usepackage{fontspec}
16 Removed: # Regular font
24 Added:
25 Added: ** Regular font
26 Added:
17 27 #+LATEX_HEADER: \setmainfont{Linux Libertine}
18 Removed: # Monospaced font
28 Added:
29 Added: ** Monospaced font
30 Added:
19 31 #+LATEX_HEADER: \setmonofont{Courier Prime}
20 32
21 33 # #+LATEX_HEADER: \usepackage{draftwatermark}
smart-documents.org
index c7a4c2e5..627555ad 100644..100644
@@ -6,7 +6,8 @@
6 6 #+EMAIL: smart-documents@tuta.io
7 7
8 8 #+OPTIONS: html-style:nil
9 Removed: #+MACRO: sd /Smart Documents/
9 Added: #+MACRO: SD /Smart Document/
10 Added: #+MACRO: SDs /Smart Documents/
10 11
11 12 # LaTeX setup
12 13 #+SETUPFILE: ~/.emacs.d/resources/templates/documents/gnu-default.setup
@@ -16,7 +17,7 @@
16 17 #+LATEX_HEADER_EXTRA: \newfontfamily\publicsans{Public Sans}
17 18
18 19 #+LATEX: \begin{abstract}
19 Removed: The idea of {{{sd}}} came to me as I was reflecting on how to improve
20 Added: The idea of {{{SDs}}} came to me as I was reflecting on how to improve
20 21 the document creation process in my workplace. The GNU Emacs editor
21 22 had captured my imagination, and I wanted to create an accessible and
22 23 highly productive text editor to benefit my organization. In this
@@ -24,7 +25,7 @@
24 25 containing both text destined to the reader, and code describing how
25 26 to update, validate, and present this text; then, I'll weave my
26 27 personal GNU Emacs customizations with a tutorial. This paper is a
27 Removed: {{{sd}}} itself!
28 Added: {{{SD}}} itself!
28 29 #+LATEX: \end{abstract}
29 30
30 31 * COMMENT All TODOs
@@ -64,7 +65,7 @@
64 65
65 66 ** TODO User details
66 67
67 Removed: One advantage of working with {{{sd}}} is that they can automatically
68 Added: One advantage of working with {{{SDs}}} is that they can automatically
68 69 be populated with our details in the header, footer, or other
69 70 appropriate element.
70 71
@@ -106,6 +107,7 @@
106 107 (add-to-list 'exec-path "C:/Users/marius.peter/PortableGit/bin/"))
107 108 #+END_SRC
108 109
110 Added:
109 111 * Early setup
110 112
111 113 ** The first file to load
@@ -156,11 +158,9 @@
156 158 (profiler-start)
157 159 #+END_SRC
158 160
159 Removed:
160 Removed:
161 161 ** Usual paths to files & directories
162 162
163 Removed: This section defines the paths that structure the overall {{{sd}}}
163 Added: This section defines the paths that structure the overall {{{SD}}}
164 164 logic.
165 165
166 166 - File :: A collection of information recognized by a computer---to
@@ -339,6 +339,7 @@
339 339 (when (file-exists-p secrets) (org-babel-load-file secrets)))
340 340 #+END_SRC
341 341
342 Added:
342 343 * Keyboard shortcuts
343 344
344 345 What follows are the most useful keybindings, as well as the
@@ -386,13 +387,18 @@
386 387 (global-set-key (kbd "C-c c") 'sd-find-literate-config)
387 388 #+END_SRC
388 389
390 Added: *** Open the Org diary
389 391
390 Removed: *** TODO Open the Org diary
391 Removed:
392 392 #+BEGIN_SRC emacs-lisp :tangle yes
393 393 (global-set-key (kbd "C-c d") 'sd-find-org-diary)
394 394 #+END_SRC
395 395
396 Added: *** Capture Org content
397 Added:
398 Added: #+BEGIN_SRC emacs-lisp :tangle yes
399 Added: (global-set-key (kbd "C-c k") 'org-capture)
400 Added: #+END_SRC
401 Added:
396 402 *** Open a recently visited file
397 403
398 404 #+BEGIN_SRC emacs-lisp :tangle yes
@@ -422,7 +428,6 @@
422 428 (find-file org-agenda-diary-file)))
423 429 #+END_SRC
424 430
425 Removed:
426 431 *** Open Org mode document properties
427 432
428 433 #+BEGIN_SRC emacs-lisp :tangle no
@@ -599,6 +604,7 @@
599 604 (global-set-key [f12] 'sd-beautify-buffer)
600 605 #+END_SRC
601 606
607 Added:
602 608 * Packages
603 609
604 610 Packages are collections of =.el= files providing added functionality
@@ -648,7 +654,7 @@
648 654 (require 'bind-key)
649 655 #+END_SRC
650 656
651 Removed: ** ~evil-mode~
657 Added: ** COMMENT ~evil-mode~
652 658
653 659 Forgive me, for I have sinned.
654 660
@@ -657,7 +663,7 @@
657 663 keys.[fn::For more information on =vi= keybindings, visit
658 664 [[https://hea-www.harvard.edu/~fine/Tech/vi.html]].]
659 665
660 Removed: #+BEGIN_SRC emacs-lisp :tangle no
666 Added: #+BEGIN_SRC emacs-lisp :tangle yes
661 667 (use-package evil)
662 668 (setq evil-toggle-key "C-c d")
663 669 (evil-mode 1)
@@ -1058,6 +1064,7 @@
1058 1064 :hook (after-init . global-emojify-mode)))
1059 1065 #+END_SRC
1060 1066
1067 Added:
1061 1068 * ~org-mode~
1062 1069
1063 1070 Org mode is so significant that this section of the paper deserves its
@@ -1217,12 +1224,17 @@
1217 1224
1218 1225 *** Sequence of TODOs
1219 1226
1227 Added:
1220 1228 #+begin_src emacs-lisp :tangle yes
1221 1229 (setq org-todo-keywords
1222 1230 '((sequence "TODO" "|" "DONE")
1223 Removed: (sequence "STUCK" "WAITING" "|" "N/A" "COMPLETED")
1224 Removed: (sequence "CONSTRUCTION" "REVIEWED" "|" "INSTALLED")))
1231 Added: (sequence "APPLY" "FOLLOW UP" "|" "REJECTED" "STOP" "OFFER")
1232 Added: (sequence "STUCK" "WAITING" "|" "N/A" "COMPLETED")))
1225 1233
1234 Added: #+end_src
1235 Added:
1236 Added: #+begin_src emacs-lisp :tangle yes
1237 Added:
1226 1238 (setq org-todo-keyword-faces
1227 1239 '(("STUCK" . (:height 1.6 :background "red" :foreground "white" :weight bold))
1228 1240 ("WAITING" . (:height 1.6 :background "yellow"))
@@ -1230,26 +1242,6 @@
1230 1242 ("COMPLETED" . (:height 1.6 :background "green" :foreground "white"))))
1231 1243 #+end_src
1232 1244
1233 Removed: ** Programming a Smart Documents
1234 Removed:
1235 Removed: The following languages can be used inside =SRC= blocks, in view of
1236 Removed: being executed by the Org Babel backend upon document export.
1237 Removed:
1238 Removed: #+BEGIN_SRC emacs-lisp :tangle yes
1239 Removed: (org-babel-do-load-languages
1240 Removed: 'org-babel-load-languages
1241 Removed: '((shell . t)
1242 Removed: (python . t)
1243 Removed: (ditaa . t)
1244 Removed: (plantuml . t)
1245 Removed: (emacs-lisp . t)
1246 Removed: (awk . t)
1247 Removed: (ledger . t)
1248 Removed: (latex . t)
1249 Removed: (C . t)
1250 Removed: (gnuplot . t)))
1251 Removed: #+END_SRC
1252 Removed:
1253 1245 ** Agenda
1254 1246
1255 1247 The agenda displays a chronological list of headings across all agenda
@@ -1257,7 +1249,8 @@
1257 1249 =org-time-stamp=.[fn::An =org-time-stamp= can be inserted with ~C-c .~
1258 1250 (period)]
1259 1251
1260 Removed: *** Open agenda in separate frame
1252 Added: *** COMMENT Open agenda in separate frame
1253 Added: # Meh
1261 1254
1262 1255 We open the agenda in a separate frame.
1263 1256
@@ -1281,8 +1274,36 @@
1281 1274 (setq org-agenda-files (concat sd-path-meta "org-agenda-files"))
1282 1275 #+END_SRC
1283 1276
1284 Removed: ** LaTeX export
1277 Added: ** Org Capture
1285 1278
1279 Added: #+BEGIN_SRC emacs-lisp :tangle yes
1280 Added: (setq org-default-notes-file (concat sd-path-resources "org/default-notes.org"))
1281 Added: #+END_SRC
1282 Added:
1283 Added: ** Programming a {{{SD}}}
1284 Added:
1285 Added: The following languages can be used inside =SRC= blocks, in view of
1286 Added: being executed by the Org Babel backend upon document export.
1287 Added:
1288 Added: #+BEGIN_SRC emacs-lisp :tangle yes
1289 Added: (org-babel-do-load-languages
1290 Added: 'org-babel-load-languages
1291 Added: '((shell . t)
1292 Added: (python . t)
1293 Added: (ditaa . t)
1294 Added: (plantuml . t)
1295 Added: (emacs-lisp . t)
1296 Added: (awk . t)
1297 Added: (ledger . t)
1298 Added: (latex . t)
1299 Added: (C . t)
1300 Added: (gnuplot . t)))
1301 Added: #+END_SRC
1302 Added:
1303 Added: ** Exporting {{{SDs}}}
1304 Added:
1305 Added: *** LaTeX export
1306 Added:
1286 1307 We'll be compiling our documents with LuaTeX. This will afford us some
1287 1308 future-proofing, since it was designated as the successor to pdfTeX by
1288 1309 the latter's creators.
@@ -1305,12 +1326,18 @@
1305 1326 -interaction=nonstopmode -outdir=%o %f"))
1306 1327 #+END_SRC
1307 1328
1308 Removed: *** Exporting timestamps
1329 Added: **** Exporting timestamps
1309 1330
1310 1331 We customize the format for org time stamps to make them appear
1311 Removed: monospaced in our exported LaTeX documents. This makes them visually
1312 Removed: distinguishable from body text.
1332 Added: monospaced in our exported LaTeX documents. This makes it easy to
1333 Added: distinguish time stamps from body text, and make them align nicely in
1334 Added: definition lists, which I prefer when logging events:
1313 1335
1336 Added: - [2021-10-03 Sun] :: Did something
1337 Added: - [2021-10-04 Mon] :: Did something else
1338 Added: - [2021-10-05 Tue] :: Did yet another thing
1339 Added:
1340 Added:
1314 1341 #+BEGIN_SRC emacs-lisp :tangle yes
1315 1342 (setq org-latex-active-timestamp-format
1316 1343 "\\texttt{%s}")
@@ -1318,7 +1345,7 @@
1318 1345 "\\texttt{%s}")
1319 1346 #+END_SRC
1320 1347
1321 Removed: *** LaTeX packages
1348 Added: **** LaTeX packages
1322 1349
1323 1350 The following packages are loaded for every time we export to LaTeX.
1324 1351
@@ -1342,7 +1369,7 @@
1342 1369 ("pdflatex" "lualatex"))))
1343 1370 #+END_SRC
1344 1371
1345 Removed: *** COMMENT Colored source blocks in PDF export
1372 Added: **** COMMENT Colored source blocks in PDF export
1346 1373
1347 1374 # Too distracting. Focus on fonts.
1348 1375
@@ -1359,7 +1386,7 @@
1359 1386 ("breakanywhere" "true"))))
1360 1387 #+END_SRC
1361 1388
1362 Removed: *** Cleaning directory after export
1389 Added: **** Cleaning directory after export
1363 1390
1364 1391 Now, we set the files to be deleted when a LaTeX \rightarrow PDF
1365 1392 compilation occurs. We only care about two files, in the end: the Org
@@ -1373,7 +1400,7 @@
1373 1400 "tex" "lot" "lof"))
1374 1401 #+END_SRC
1375 1402
1376 Removed: *** Chronological diary entries
1403 Added: **** Chronological diary entries
1377 1404
1378 1405 By default, Org agenda inserts diary entries as the first under the
1379 1406 selected date. It is preferable to insert entries in the order that
@@ -1383,7 +1410,7 @@
1383 1410 (setq org-agenda-insert-diary-strategy 'date-tree-last)
1384 1411 #+END_SRC
1385 1412
1386 Removed: *** Extra LaTeX class
1413 Added: **** Extra LaTeX class
1387 1414
1388 1415 This /letter/ template completes the other default LaTeX classes.
1389 1416
@@ -1405,7 +1432,7 @@
1405 1432 ("\\subsubsection*{%s}" . "\\subsubsection*{%s}")))
1406 1433 #+END_SRC
1407 1434
1408 Removed: *** COMMENT Table of contents
1435 Added: **** COMMENT Table of contents
1409 1436 # Commented out on <2021-09-21 Tue>.
1410 1437
1411 1438 By default, body text can immediately follow the table of contents. It
@@ -1419,7 +1446,7 @@
1419 1446 The following makes =TODO= items appear red and =CLOSED= items appear
1420 1447 green in Org's LaTeX exports. Very stylish, much flair!
1421 1448
1422 Removed: *** AUCTEX
1449 Added: **** AUCTEX
1423 1450
1424 1451 #+BEGIN_SRC emacs-lisp :tangle yes
1425 1452 (use-package tex
@@ -1432,7 +1459,7 @@
1432 1459 (auctex-latexmk-setup)
1433 1460 #+END_SRC
1434 1461
1435 Removed: *** Groff export
1462 Added: **** Groff export
1436 1463
1437 1464 #+BEGIN_SRC emacs-lisp :tangle no
1438 1465 (require 'ox-groff)
@@ -1442,7 +1469,7 @@
1442 1469
1443 1470 This is a mind-bending capacity of Org mode: we can assign arbitrary
1444 1471 functions to be executed when a user follows an Org link. Org links
1445 Removed: appear like hyperlinks both in buffers and PDF exports---e.g. the
1472 Added: appear as hyperlinks both in buffers and PDF exports---e.g. the
1446 1473 following link to this very section, Section [[Org links]]---but their
1447 1474 in-buffer behavior can be arbitrarily assigned.
1448 1475
@@ -1458,6 +1485,7 @@
1458 1485 [[tag:work+phonenumber-boss][Optional Description]]
1459 1486 #+END_SRC
1460 1487
1488 Added:
1461 1489 * One-click workflows
1462 1490
1463 1491 In this section, we'll implement useful one-click workflows. It comes
@@ -1472,12 +1500,10 @@
1472 1500 keybinding subsection, and not the subsection describing the
1473 1501 ``one-click workflow''.
1474 1502
1475 Removed:
1476 1503 ** Opening files
1477 1504
1478 1505 First off, we identify files that we'd like to jump to conveniently.
1479 1506
1480 Removed:
1481 1507 *** This very file
1482 1508
1483 1509 We begin by defining a function to open this very file.
@@ -1498,7 +1524,6 @@
1498 1524 (find-file org-agenda-diary-file))
1499 1525 #+END_SRC
1500 1526
1501 Removed:
1502 1527 ** TODO Export to PDF
1503 1528
1504 1529 This series of ~quick-export~ functions have one objective: harmonize
@@ -1609,7 +1634,6 @@
1609 1634
1610 1635 #+END_SRC
1611 1636
1612 Removed:
1613 1637 **** TODO COMMENT For Org mode, specifically
1614 1638
1615 1639 #+BEGIN_SRC emacs-lisp :tangle yes
@@ -1626,13 +1650,11 @@
1626 1650 (newline))))
1627 1651 #+END_SRC
1628 1652
1629 Removed:
1630 1653 ** Smart quitting
1631 1654 :PROPERTIES:
1632 1655 :test: t
1633 1656 :END:
1634 1657
1635 Removed:
1636 1658 *** Window
1637 1659
1638 1660 #+BEGIN_SRC emacs-lisp :tangle yes
@@ -1655,6 +1677,7 @@
1655 1677 (save-buffers-kill-terminal)))
1656 1678 #+END_SRC
1657 1679
1680 Added:
1658 1681 * Editing preferences
1659 1682
1660 1683 These customizations enhance editor usability. They also encompass
@@ -1911,6 +1934,7 @@
1911 1934 (set-window-scroll-bars (minibuffer-window) nil nil)
1912 1935 #+END_SRC
1913 1936
1937 Added:
1914 1938 * Themes
1915 1939 # This is just another comment.
1916 1940
@@ -2109,6 +2133,7 @@
2109 2133
2110 2134 ** TODO ~minimal~
2111 2135
2136 Added:
2112 2137 * Late setup
2113 2138
2114 2139 At this point, our editor is almost ready to run. Phew! All that's
@@ -2127,11 +2152,13 @@
2127 2152 (profiler-report)
2128 2153 #+END_SRC
2129 2154
2155 Added:
2130 2156 * Conclusion
2131 2157
2132 2158 In this configuration file, we described a series of customization
2133 2159 steps taken to make Emacs more palatable to modern word processors
2134 2160 users.
2161 Added:
2135 2162
2136 2163 * Local files variables
2137 2164 :PROPERTIES:
smart-documents.pdf
index 7bea97af..00000000 100644..000000

Binary files differ