Writing Configuration
Org Mode
Org Mode configuration for note-taking, task management, and document export.
Core Settings
- Hard wrap text at 80 characters for cleaner Git diffs
- Record timestamps on task completion
- Hide inline emphasis markers (
*bold*appears as bold) - Archive completed tasks to an "Archive" heading within the same file
- Collect agenda items from
~/org,~/org/roam, and~/org/roam/daily
(add-hook 'org-mode-hook #'auto-fill-mode) ;; Load Org's dependencies during idle time so the first Org buffer opens faster (doom-load-packages-incrementally '(org)) (after! org (setq org-log-done 'time org-agenda-start-with-log-mode t org-hide-emphasis-markers t +org-capture-todo-file "Tasks.org" org-archive-location "::* Archive" org-agenda-files '("~/org" "~/org/roam" "~/org/roam/daily")) ;; Use pdf-tools for viewing exported PDFs (add-to-list 'org-file-apps '("\\.pdf\\'" . pdf-tools)) ;; Larger heading fonts for visual hierarchy (custom-set-faces! '(org-level-1 :height 1.2 :inherit outline-1) '(org-level-2 :height 1.1 :inherit outline-2)) ;; LaTeX export configuration (require 'ox-latex) (require 'ox-bibtex) ;; Use Tectonic as the LaTeX engine (self-contained, auto-fetches dependencies) (setq org-latex-pdf-process `(,(concat "tectonic --outdir=%o %f -Z search-path=" doom-user-dir "latex"))) ;; Use engrave-faces for syntax-highlighted code blocks in LaTeX (setq org-latex-src-block-backend 'engraved) ;; Additional LaTeX packages for better tables and colours (setq org-latex-packages-alist '(("" "booktabs") ("" "tabularx") ("" "color"))) ;; Custom 'mimore' document class for exports (add-to-list 'org-latex-classes '("mimore" "\\documentclass{mimore}\n\[NO-DEFAULT-PACKAGES\]\n\[PACKAGES\]\n\[EXTRA\]" ("\\section{%s}" . "\\section\*{%s}") ("\\subsection{%s}" . "\\subsection\*{%s}") ("\\subsubsection{%s}" . "\\subsubsection\*{%s}") ("\\paragraph{%s}" . "\\paragraph\*{%s}") ("\\subparagraph{%s}" . "\\subparagraph\*{%s}"))) (setq org-latex-default-class "mimore"))
HTML Export
Every C-c C-e h o export uses a single hand-built theme (html/org-export.css)
applied globally, rather than a per-file opt-in. The stylesheet (plus a Google
Fonts <link> for Newsreader/JetBrains Mono, in html/org-export-fonts.html)
is inlined into org-html-head at export time, so exported files are mostly
self-contained — only the web fonts need network access, falling back to the
system font stack when offline. Code blocks are colourised via htmlize,
baking in the current Emacs theme's (doom-dracula) syntax-highlighting colours
directly as inline styles when exporting interactively from Doom. The headless
GitHub Pages build (.github/scripts/publish.el) has no live theme to pull
colours from, so published code blocks currently render without syntax
highlighting (bold/italic only) — a known gap, not a bug. The page defaults to
a light off-white look; a toggle button in the header bar switches to a dark
variant client-side (persisted via localStorage) rather than following the
reader's OS/browser preference automatically.
The actual variable-setting lives in html/export-settings.el rather than
inline here, so the exact same config can be loaded by the GitHub Pages
publish script (.github/scripts/publish.el), which runs in a plain
emacs --batch session without Doom's after! macro available.
(after! org
(load (concat doom-user-dir "html/export-settings.el")))
Org-Tree-Slide
Present directly from Org buffers using org-tree-slide. Top-level headings
become slides, with the fancy profile enabled for animations.
(after! org-tree-slide
(setq org-tree-slide-skip-outline-level 2)
(org-tree-slide-presentation-profile))
Org Roam
Org Roam extends Org Mode into a personal knowledge graph. The graph display hides common link types (file, http, https) to reduce visual noise.
(after! org-roam (setq org-roam-graph-link-hidden-types '("file" "http" "https")))
Org Roam UI
Web-based graph visualization for Org Roam. Syncs with the current Emacs theme and follows the active buffer.
;; org-roam-ui talks to the browser over a websocket, so make sure the package ;; is loaded alongside org-roam (after! org-roam (require 'websocket)) (after! org-roam-ui (setq org-roam-ui-sync-theme t org-roam-ui-follow t org-roam-ui-update-on-save t org-roam-ui-open-on-start t))
Calendar
Map SPC o c to open a full calendar view via calfw, complementing the standard
org-agenda view.
;; NOTE: no label on :prefix — `SPC o` is already labelled "open" upstream, and ;; since Doom 635bc939 a labelled :prefix rebinds the prefix to a fresh keymap, ;; wiping every binding already there. (map! :leader :prefix "o" :desc "Open calendar" "c" #'cfw:open-org-calendar)
Markdown
Configure grip-mode for GitHub-flavored Markdown preview. Credentials are loaded
from ~/.authinfo to avoid API rate limiting.
(require 'auth-source) (let ((credential (auth-source-user-and-password "api.github.com"))) (setq grip-github-user (car credential) grip-github-password (cadr credential)))