From 06b61743d200ec9427fda45e89caa3467314c872 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sat, 14 Mar 2026 01:56:31 -0700 Subject: Emacs configuration clean; attempt to build website --- config/emacs.org | 1414 +++++++++++++++++++++++++++++------------------------- 1 file changed, 762 insertions(+), 652 deletions(-) (limited to 'config/emacs.org') diff --git a/config/emacs.org b/config/emacs.org index d262138..5df511e 100644 --- a/config/emacs.org +++ b/config/emacs.org @@ -1,12 +1,140 @@ #+title: Emacs Configuration #+author: Preston Pan #+description: my personal emacs configuration for NixOS +#+PROPERTY: header-args :tangle yes :comments link * Introduction This is my Vanilla Emacs configuration, made to work with my NixOS configuration. For that reason, you will not see :ensure t inside any use-package declaration, for emacs packages are all compiled natively and reproducibly on the NixOS side. This configuration uses the emacs-lisp language only to configure variables for said packages, for the most part. +* Initialization +This must be the very first line in the tangled file to enable lexical binding. +#+begin_src emacs-lisp :tangle ../nix/init.el +;; -*- lexical-binding: t; -*- +#+end_src +** State +This is my imperative state. Note that a lot of the state is just in the form of various macros that I use in order to write in declarative +syntax elsewhere. Generally, however, these are all unordered and not dependent on each other loading first. +#+begin_src emacs-lisp :tangle ../nix/init.el +;; pure, well okay it prints but whatever +(defmacro try (expr) + `(condition-case err + ,expr + (error + (princ (format "BLOCK FAILED: %s\n" (error-message-string err)))))) + +;; pure +(defmacro declare-irc-server (name server port) + `(defun ,name () + (interactive) + (erc-tls :server ,server + :port ,port))) + +;; pure, well imperative when evaluated but they're all just bindings that don't depend on each other +(defmacro create-irc-servers (&rest server-list) + `(progn + ,@(mapcar (lambda (n) `(declare-irc-server ,@n)) server-list))) + +;; pure +(defun org-html-latex-environment-pandoc-fix (orig-fun latex-environment contents info) + "Force `ox-html' to use the convert command for LaTeX environments when set to 'html." + (let ((processing-type (plist-get info :with-latex))) + (if (eq processing-type 'html) + (let* ((latex-frag (org-remove-indentation (org-element-property :value latex-environment))) + (converted (org-format-latex-as-html latex-frag))) + (format "
\n\n%s\n\n
" converted)) + (funcall orig-fun latex-environment contents info)))) + +;; imperative +(defun insert-urandom-password (&optional length) + (interactive "P") + (let ((length (or length 32)) + (chars "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_=+[]{};:,.<>?")) + (insert + (with-temp-buffer + (call-process "head" nil t nil "-c" (number-to-string length) "/dev/urandom") + (let ((bytes (buffer-string))) + (mapconcat (lambda (c) + (string (elt chars (mod (string-to-char (char-to-string c)) (length chars))))) + bytes "")))))) + +;; imperative +(defun create-htmlize-css () + (org-html-htmlize-generate-css) + (with-current-buffer "*html*" + (buffer-string))) + +;; imperative +(defun minify-css (css) + "A functional wrapper around the external 'minify' binary." + (with-temp-buffer + (insert css) + (call-process-region (point-min) (point-max) "minify" t t nil "--type=css") + (buffer-string))) + +;; imperative +(defun emacs-config () + (unless noninteractive (server-start)) + + ;; start with sane defaults + (pixel-scroll-precision-mode 1) + (display-battery-mode 1) + (display-time-mode 1) + (menu-bar-mode -1) + (scroll-bar-mode -1) + (tool-bar-mode -1) + + ;; load theme, fonts, and transparency. Prettify symbols. + (set-face-attribute 'default nil :font "Iosevka Nerd Font" :height 130) + (set-face-attribute 'variable-pitch nil :font "Lora" :height 1.1) + + (when (display-graphic-p) + (set-fontset-font t 'han (font-spec :family "Noto Sans CJK SC")) + (set-fontset-font t 'kana (font-spec :family "Noto Sans CJK JP")) + (set-fontset-font t 'symbol (font-spec :family "Noto Color Emoji")) + (set-fontset-font t 'symbol (font-spec :family "Symbols Nerd Font Mono") nil 'append)) + (set-frame-parameter nil 'alpha-background 70)) + +;; imperative +(defun evil-config () + (evil-mode 1) + (evil-set-undo-system 'undo-redo) + (evil-set-initial-state 'pdf-view-mode 'normal)) + +;; imperative +(defun doom-themes-config () + (load-theme 'doom-rouge t) + (doom-themes-visual-bell-config) + (doom-themes-treemacs-config) + (doom-themes-org-config)) + +;; imperative +(defun org-roam-config () + (org-roam-db-autosync-mode) + (org-roam-update-org-id-locations)) + +;; same as above +(defun org-electric-pair () + (setq-local electric-pair-inhibit-predicate + (lambda (c) (if (eq c ?<) t (electric-pair-default-inhibit c))))) + +;; same as above +(defun org-yasnippet-latex () (yas-activate-extra-mode 'latex-mode)) + +;; same as above +(defun remove-annoying-pairing () (remove-hook 'post-self-insert-hook #'yaml-electric-bar-and-angle t)) + +#+end_src +** Random Packages +These are packages that I require in order to write some scripts in emacs-lisp. +#+begin_src emacs-lisp :tangle ../nix/init.el +(use-package tex-site) +(use-package subr-x) +(use-package dash) +(use-package s) +(use-package f) +#+end_src ** Emacs These are all the options that need to be set at the start of the program. Because use-package is largely declarative, the order of many of these options should not matter. However, there @@ -15,20 +143,27 @@ configuration as they are also defined using the use-package macros. Some of the have documentation strings attached, so it is easy to follow what the individual options do. Emacs is self documenting, after all! #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package emacs +(use-package emacs :custom ;; global defaults (indent-tabs-mode nil "no real tabs, only spaces") (tab-width 2 "tab show as 2 spaces") (standard-indent 2 "base indentation") + (custom-safe-themes t "I already manage my themes with nix") + (custom-file null-device "Don't save custom configs") ;; Startup errors (warning-minimum-level :emergency "Supress emacs warnings") (confirm-kill-processes nil "Don't ask to quit") (debug-ignored-errors (cons 'remote-file-error debug-ignored-errors) "Remove annoying error from debug errors") - (browse-url-generic-program "librewolf") - (browse-url-secondary-browser-function 'browse-url-generic) - (browse-url-browser-function 'browse-url-generic) + (browse-url-generic-program "librewolf" "set browser to librewolf") + (browse-url-secondary-browser-function 'browse-url-generic "set browser") + (browse-url-browser-function 'browse-url-generic "set browser") + (default-frame-alist '((alpha-background . 70) + (vertical-scroll-bars) + (internal-border-width . 24) + (left-fringe . 8) + (right-fringe . 8))) ;; Mouse wheel (mouse-wheel-scroll-amount '(1 ((shift) . 1)) "Nicer scrolling") @@ -38,88 +173,23 @@ Emacs is self documenting, after all! (scroll-step 1 "Scroll one line at a time") (debug-on-error nil "Don't make the annoying popups") (display-time-24hr-format t "Use 24 hour format to read the time") - (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") - (use-short-answers t "Use y instead of yes") - (make-backup-files nil "Don't make backups") - (display-fill-column-indicator-column 150 "Draw a line at 100 characters") - (fill-column 150) - (line-spacing 2 "Default line spacing") - (c-doc-comment-style '((c-mode . doxygen) - (c++-mode . doxygen))) - - :hook ((text-mode . visual-line-mode) - (prog-mode . display-line-numbers-mode) - (prog-mode . display-fill-column-indicator-mode) - (org-mode . auto-fill-mode) - (org-mode . display-fill-column-indicator-mode) - (org-mode . display-line-numbers-mode) - (org-mode . (lambda () - (setq prettify-symbols-alist - '(("#+begin_src" . ?) - ("#+BEGIN_SRC" . ?) - ("#+end_src" . ?) - ("#+END_SRC" . ?) - ("#+begin_example" . ?) - ("#+BEGIN_EXAMPLE" . ?) - ("#+end_example" . ?) - ("#+END_EXAMPLE" . ?) - ("#+header:" . ?) - ("#+HEADER:" . ?) - ("#+name:" . ?﮸) - ("#+NAME:" . ?﮸) - ("#+results:" . ?) - ("#+RESULTS:" . ?) - ("#+call:" . ?) - ("#+CALL:" . ?) - (":PROPERTIES:" . ?) - (":properties:" . ?) - ("lambda" . ?λ) - ("->" . ?→) - ("map" . ?↦) - ("/=" . ?≠) - ("!=" . ?≠) - ("==" . ?≡) - ("<=" . ?≤) - (">=" . ?≥) - ("&&" . ?∧) - ("||" . ?∨) - ("sqrt" . ?√) - ("..." . ?…))) - (prettify-symbols-mode))) - (prog-mode . - (lambda () - (setq prettify-symbols-alist - '(("lambda" . ?λ) - ("->" . ?→) - ("map" . ?↦) - ("/=" . ?≠) - ("!=" . ?≠) - ("==" . ?≡) - ("<=" . ?≤) - (">=" . ?≥) - ("&&" . ?∧) - ("||" . ?∨) - ("sqrt" . ?√) - ("..." . ?…))) - (prettify-symbols-mode)))) - :config - (require 'tex-site) - (require 'subr-x) - (server-start) - - ;; start with sane defaults - (pixel-scroll-precision-mode 1) - (display-battery-mode 1) - (display-time-mode 1) - (menu-bar-mode -1) - (scroll-bar-mode -1) - (tool-bar-mode -1) - - ;; load theme, fonts, and transparency. Prettify symbols. - (global-prettify-symbols-mode 1) - (set-face-attribute 'default nil :font "Iosevka Nerd Font" :height 130) - (set-frame-parameter nil 'alpha-background 70) - (add-to-list 'default-frame-alist '(alpha-background . 70))) + (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") + (use-short-answers t "Use y instead of yes") + (make-backup-files nil "Don't make backups") + (display-fill-column-indicator-column 150 "Draw a line at 100 characters") + (fill-column 150) + (line-spacing 2 "Default line spacing") + (c-doc-comment-style '((c-mode . doxygen) + (c++-mode . doxygen))) + + + :hook ((text-mode . visual-line-mode) + (prog-mode . display-line-numbers-mode) + (prog-mode . display-fill-column-indicator-mode) + (org-mode . auto-fill-mode) + (org-mode . display-fill-column-indicator-mode) + (org-mode . display-line-numbers-mode)) + :config (emacs-config)) #+end_src As you can see, the config (and sometimes the init section) of most of these use-package blocks contain most of the imperative commands. In fact, most of the configurations are completely @@ -134,263 +204,306 @@ of course Emacs was not designed to be fully imperative. ** Org Mode This is my org mode configuration, which also configures latex. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package org - :hook - ((org-mode-hook . (lambda () (remove-hook 'post-self-insert-hook #'yaml-electric-bar-and-angle t)))) - :custom - (org-confirm-babel-evaluate nil "Don't ask to evaluate code block") - (org-export-with-broken-links t "publish website even with broken links") - (org-src-fontify-natively t "Colors!") - (org-latex-preview-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") - (org-preview-latex-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") - (TeX-PDF-mode t) - (org-latex-compiler "xelatex" "Use latex as default") - (org-latex-pdf-process '("xelatex -interaction=nonstopmode -output-directory=%o %f") "set xelatex as default") - (TeX-engine 'xetex "set xelatex as default engine") - (preview-default-option-list '("displaymath" "textmath" "graphics") "preview latex") - (preview-image-type 'png "Use PNGs") - ;; (org-format-latex-options (plist-put org-format-latex-options :scale 1.5) "space latex better") - (org-return-follows-link t "be able to follow links without mouse") - (org-habit-preceding-days 7 "See org habit entries") - (org-habit-following-days 35 "See org habit entries") - (org-habit-show-habits t "See org habit entries") - (org-habit-show-habits-only-for-today nil "See org habit entries") - (org-habit-show-all-today t "Show org habit graph") - (org-startup-indented t "Indent the headings") - (org-image-actual-width '(300) "Cap width") - (org-startup-with-latex-preview t "see latex previews on opening file") - (org-startup-with-inline-images t "See images on opening file") - (org-hide-emphasis-markers t "prettify org mode") - (org-use-sub-superscripts "{}" "Only display superscripts and subscripts when enclosed in {}") - (org-pretty-entities t "prettify org mode") - (org-agenda-files (list "~/monorepo/agenda.org" "~/org/notes.org" "~/org/agenda.org") "set default org files") - (org-default-notes-file (concat org-directory "/notes.org") "Notes file") - (org-html-with-latex 'html "let my html handler handle latex") - (org-html-mathjax-options nil "disable mathjax, use MathML") - (org-html-mathjax-template "" "disable mathjax, use MathML") - (org-html-head-include-default-style nil "use my own css for everything") - (org-html-head-include-scripts nil "use my own js for everything") - (org-html-divs '((preamble "header" "preamble") - (content "main" "content") - (postamble "footer" "postamble")) "semantic html exports") - (org-html-head-extra (concat "\n\n\n\n\n\n\n\n\n\n\n" - "") "add all these different headers for performance and compliance") - (org-latex-to-html-convert-command - "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^

//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") - (org-html-viewport '((width "device-width") - (initial-scale "1.0") - (minimum-scale "1.0")) "Prevent zooming out past default size") - (org-publish-project-alist - '(("website-org" - :base-directory "~/monorepo" - :base-extension "org" - :exclude "nix/README\\.org" - :publishing-directory "~/website_html" - :with-author t - :with-date t - :recursive t - :publishing-function org-html-publish-to-html - :headline-levels 4 - :html-preamble t - :html-preamble-format (("en" "

home | section main page


"))) - ("website-static" - :base-directory "~/monorepo" - :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt\\|webp\\|conf" - :publishing-directory "~/website_html/" - :recursive t - :publishing-function org-publish-attachment) - ("website" :auto-sitemap t :components ("website-org" "website-static"))) "functions to publish website") - (org-html-postamble (concat "Copyright © 2024 " system-fullname) "set copyright notice on bottom of site") - :config - (require 'ox-publish) - (require 'org-tempo) - (require 'org-habit) - (require 'ob-latex) - - (defun my-org-html-latex-environment-pandoc-fix (orig-fun latex-environment contents info) - "Force `ox-html' to use the convert command for LaTeX environments when set to 'html." - (let ((processing-type (plist-get info :with-latex))) - (if (eq processing-type 'html) - (let* ((latex-frag (org-remove-indentation - (org-element-property :value latex-environment))) - (converted (org-format-latex-as-html latex-frag))) - (format "
\n\n%s\n\n
" - converted)) - (funcall orig-fun latex-environment contents info)))) - - (advice-add 'org-html-latex-environment :around #'my-org-html-latex-environment-pandoc-fix) - - (org-babel-do-load-languages 'org-babel-load-languages - '((shell . t) - (python . t) - (nix . t) - (latex . t)))) +(use-package org + :after (f s dash nix-mode) + :hook + ((org-mode-hook . remove-annoying-pairing)) + :custom + ;; Fix terrible indentation issues + (org-edit-src-content-indentation 0) + (org-src-tab-acts-natively t) + (org-src-preserve-indentation t) + + (TeX-PDF-mode t) + (org-confirm-babel-evaluate nil "Don't ask to evaluate code block") + (org-export-with-broken-links t "publish website even with broken links") + (org-src-fontify-natively t "Colors!") + + ;; org-latex + (org-preview-latex-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") + (org-latex-preview-ltxpng-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") + (org-latex-to-html-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^

//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") + (org-latex-to-mathml-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^

//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") + + (TeX-engine 'xetex "set xelatex as default engine") + (preview-default-option-list '("displaymath" "textmath" "graphics") "preview latex") + (preview-image-type 'png "Use PNGs") + (org-format-latex-options + '(:foreground default + :background default + :scale 2 + :html-foreground "Black" + :html-background "Transparent" + :html-scale 1.5 + :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) "space latex better") + (org-return-follows-link t "be able to follow links without mouse") + (org-startup-indented t "Indent the headings") + (org-image-actual-width '(300) "Cap width") + (org-startup-with-latex-preview t "see latex previews on opening file") + (org-startup-with-inline-images t "See images on opening file") + (org-hide-emphasis-markers t "prettify org mode") + (org-use-sub-superscripts "{}" "Only display superscripts and subscripts when enclosed in {}") + (org-pretty-entities t "prettify org mode") + (org-agenda-files (list "~/monorepo/agenda.org" "~/org/notes.org" "~/org/agenda.org") "set default org files") + (org-default-notes-file (concat org-directory "/notes.org") "Notes file") + + ;; ricing + (org-auto-align-tags nil) + (org-tags-column 0) + (org-catch-invisible-edits 'show-and-error) + (org-special-ctrl-a/e t) + (org-insert-heading-respect-content t) + (org-hide-emphasis-markers t) + (org-pretty-entities t) + (org-agenda-tags-column 0) + (org-ellipsis "…") + :config + (org-babel-do-load-languages 'org-babel-load-languages + '((shell . t) + (python . t) + (nix . t) + (latex . t)))) + +(use-package org-tempo + :after org) + +(use-package org-habit + :after org + :custom + (org-habit-preceding-days 7 "See org habit entries") + (org-habit-following-days 35 "See org habit entries") + (org-habit-show-habits t "See org habit entries") + (org-habit-show-habits-only-for-today nil "See org habit entries") + (org-habit-show-all-today t "Show org habit graph")) + +(use-package htmlize + :after (doom-themes catppuccin-theme)) + +(use-package ox-latex + :after (org) + :custom + (org-latex-compiler "xelatex" "Use latex as default") + (org-latex-pdf-process '("xelatex -interaction=nonstopmode -output-directory=%o %f") "set xelatex as default")) + +(use-package ox-html + :after (org htmlize) + :custom + (org-html-htmlize-output-type 'css "allow styling from CSS file") + (org-html-with-latex 'html "let my html handler handle latex") + (org-html-mathjax-options nil "disable mathjax, use MathML") + (org-html-mathjax-template "" "disable mathjax, use MathML") + (org-html-head-include-default-style nil "use my own css for everything") + (org-html-head-include-scripts nil "use my own js for everything") + (org-html-postamble (concat "Copyright © 2024 " system-fullname) "set copyright notice on bottom of site") + (org-html-divs '((preamble "header" "preamble") + (content "main" "content") + (postamble "footer" "postamble")) "semantic html exports") + (org-html-viewport '((width "device-width") + (initial-scale "1.0") + (minimum-scale "1.0")) "Prevent zooming out past default size") + :config (advice-add 'org-html-latex-environment :around #'org-html-latex-environment-pandoc-fix)) + +(use-package ox-publish + :after (org f s dash ox-html) + :custom + (org-publish-project-alist + `(("website-org" + :base-directory "~/monorepo" + :base-extension "org" + :exclude "nix/README\\.org" + :publishing-directory "~/website_html" + :with-author t + :with-date t + :recursive t + :publishing-function org-html-publish-to-html + :headline-levels 4 + :html-head ,(concat "\n\n\n\n\n\n\n\n\n\n\n" + "" "") + (s-trim) + (minify-css)) + (f-read-text "~/monorepo/style.css" 'utf-8) + "") + :html-preamble t + :html-preamble-format (("en" "

home | section main page


"))) + ("website-static" + :base-directory "~/monorepo" + :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt\\|webp\\|conf" + :publishing-directory "~/website_html/" + :recursive t + :publishing-function org-publish-attachment) + ("website" :auto-sitemap t :components ("website-org" "website-static"))) "functions to publish website")) #+end_src As you can see, I only have one real entry in config here (I don't count requires even though they have to be on the top) -* Unicode -I want emacs to have unicode fonts. +* All The Icons +I already pull in all-the-icons, but we need the emacs package to load it correctly. +#+begin_src emacs-lisp :tangle ../nix/init.el +(use-package all-the-icons + :if (display-graphic-p)) +#+end_src +* Variable Pitch Font +I use this in org-mode so that I can read/write with variable pitched font. Feels like I'm reading a blog article or something. +#+begin_src emacs-lisp :tangle ../nix/init.el +(use-package mixed-pitch + :hook ((text-mode . mixed-pitch-mode) + (org-mode . mixed-pitch-mode)) + :custom (mixed-pitch-set-height t) + :config + (dolist (face '(org-latex-and-related + org-priority + org-block + org-table + org-formula)) + (add-to-list 'mixed-pitch-fixed-pitch-faces face))) +#+end_src +* Writeroom +#+begin_src emacs-lisp :tangle ../nix/init.el +(use-package writeroom-mode + :custom (writeroom-width 150)) +#+end_src +* Indent Bars +I want to show indent lines in emacs so that I can line things up. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package unicode-fonts - :init (unicode-fonts-setup)) +(use-package indent-bars + :after (nix-mode) + :hook ((python-mode yaml-mode nix-mode) . indent-bars-mode)) #+end_src * Autopair Use electric-pair to automatically complete pairs of things. We need to change what electric-pair does based on the mode. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package electric-pair - :hook ((prog-mode . electric-pair-mode) - (org-mode . (lambda () (setq-local electric-pair-inhibit-predicate (lambda (c) (if (eq c ?<) t (electric-pair-default-inhibit c)))))))) +(use-package electric-pair + :hook ((prog-mode . electric-pair-mode) + (org-mode . org-electric-pair))) #+end_src * Search and Replace wgrep is a program that allows you to do more intelligent search and replace. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package wgrep - :after grep) -#+end_src -* Passwords -This is a function that inserts a random password into the buffer. I use this to manage sops-nix. -#+begin_src emacs-lisp :tangle ../nix/init.el - (defun insert-urandom-password (&optional length) - (interactive "P") - (let ((length (or length 32)) - (chars "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()-_=+[]{};:,.<>?")) - (insert - (with-temp-buffer - (call-process "head" nil t nil "-c" (number-to-string length) "/dev/urandom") - (let ((bytes (buffer-string))) - (mapconcat (lambda (c) - (string (elt chars (mod (string-to-char (char-to-string c)) (length chars))))) - bytes "")))))) +(use-package wgrep + :after grep) #+end_src * Fragtog This package is used to generate previews automatically when your cursor hovers over a latex snippet. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package org-fragtog :hook (org-mode . org-fragtog-mode)) +(use-package org-fragtog :hook (org-mode . org-fragtog-mode)) #+end_src * Snippets Yasnippets are useful for macros that automatically complete to an arbitrary form. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package yasnippet - :config - (add-to-list 'yas-snippet-dirs "~/monorepo/yasnippet/") - (yas-global-mode 1) - :hook (org-mode . (lambda () (yas-minor-mode) (yas-activate-extra-mode 'latex-mode)))) +(use-package yasnippet + :demand t + :hook (org-mode . org-yasnippet-latex) + :custom (yas-snippet-dirs '("~/monorepo/yasnippet/" "~/.emacs.d/snippets")) + :config (yas-global-mode 1)) + +(use-package yasnippet-snippets + :after yasnippet) #+end_src * Completion Company-mode! We need this to do autocomplete stuff. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package company - :config - '(add-to-list 'company-backends '(company-ispell company-capf company-yasnippet company-files)) - :hook ((after-init . global-company-mode))) +(use-package company + :custom (company-backends '(company-ispell company-capf company-yasnippet company-files) "Set company backends") + :hook ((after-init . global-company-mode))) +(use-package company-box + :hook (company-mode . company-box-mode)) #+end_src * Spelling This loads a dictionary so that I can save certain words to be not misspelled and also have this spellcheck during org mode. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package ispell - :custom - (ispell-program-name "aspell" "use aspell") - (ispell-silently-savep t "Save changes to dict without confirmation") - (ispell-dictionary "en" "Use english dictionary") - (ispell-alternate-dictionary "~/.local/share/dict" "dict location")) +(unless noninteractive (use-package ispell + :custom + (ispell-program-name "aspell" "use aspell") + (ispell-local-dictionary-alist + '(("en" "[[:alpha:]]" "[^[:alpha:]]" "[']" t ("-d" "en") nil utf-8))) + (ispell-dictionary "en" "Use english dictionary") + (ispell-extra-args my-ispell-args "Force aspell to use normal mode instead of nroff") + (ispell-silently-savep t "Save changes to dict without confirmation") + (ispell-alternate-dictionary my-ispell-dictionary "dict location"))) - (use-package flyspell - :hook (text-mode . flyspell-mode)) +(unless noninteractive (use-package flyspell + :hook (text-mode . flyspell-mode))) #+end_src * Packages First, some small configurations and some evil-mode initilaization because I like vim keybindings: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package evil - :custom - (evil-want-keybinding nil "Don't load a whole bunch of default keybindings") - :config - (evil-mode 1) - (evil-set-undo-system 'undo-redo) - (evil-set-initial-state 'pdf-view-mode 'normal) - ;; bind / and ? safely after evil is loaded - (define-key evil-normal-state-map (kbd "/") 'swiper) - (define-key evil-normal-state-map (kbd "?") - (lambda () (interactive) (swiper "--reverse")))) - - (use-package evil-collection - :after (evil) - :config - (with-eval-after-load 'evil-maps - (define-key evil-motion-state-map (kbd "SPC") nil) - (define-key evil-motion-state-map (kbd "RET") nil) - (define-key evil-motion-state-map (kbd "TAB") nil)) - (evil-collection-init)) - - (use-package evil-commentary - :after (evil) - :config - (evil-commentary-mode)) - - (use-package evil-org - :after (evil org) - :hook (org-mode . (lambda () evil-org-mode)) - :config - (require 'evil-org-agenda) - (evil-org-agenda-set-keys)) - - (use-package which-key - :config - (which-key-mode)) - - (use-package page-break-lines - :init - (page-break-lines-mode)) +(use-package evil + :demand t + :custom (evil-want-keybinding nil "Don't load a whole bunch of default keybindings") + :bind + (:map evil-normal-state-map + ("/" . swiper) + ("?" . (lambda () (interactive) (swiper "--reverse")))) + :config (evil-config)) + +(use-package evil-collection + :demand t + :after (evil) + :bind (:map evil-motion-state-map + ("SPC" . nil) + ("RET" . nil) + ("TAB" . nil)) + :config (evil-collection-init)) + +(use-package evil-commentary + :after (evil) + :config (evil-commentary-mode)) + +(use-package evil-org + :after (evil org) + :hook (org-mode . evil-org-mode)) + +(use-package evil-org-agenda + :after (evil-org) + :config (evil-org-agenda-set-keys)) + +(use-package which-key + :config (which-key-mode)) + +(use-package page-break-lines + :config (page-break-lines-mode)) #+end_src ** Journal I use org-journal to journal about my life, and it's a part of my website: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package org-journal - :after (org) - :custom - (org-journal-dir "~/monorepo/journal/" "Set journal directory") - (org-journal-date-format "%A, %d %B %Y" "Date format") - (org-journal-file-format "%Y%m%d.org" "Automatic file creation format based on date") - (org-journal-enable-agenda-integration t "All org-journal entries are org-agenda entries") - :init - (defun org-journal-file-header-func (time) - "Custom function to create journal header." - (concat - (pcase org-journal-file-type - (`daily "#+TITLE: Daily Journal\n#+STARTUP: showeverything\n#+DESCRIPTION: My daily journal entry\n#+AUTHOR: Preston Pan\n#+options: broken-links:t") - (`weekly "#+TITLE: Weekly Journal\n#+STARTUP: folded") - (`monthly "#+TITLE: Monthly Journal\n#+STARTUP: folded") - (`yearly "#+TITLE: Yearly Journal\n#+STARTUP: folded")))) - (setq org-journal-file-header 'org-journal-file-header-func)) +(use-package org-journal + :after (org) + :custom + (org-journal-dir "~/monorepo/journal/" "Set journal directory") + (org-journal-date-format "%A, %d %B %Y" "Date format") + (org-journal-file-format "%Y%m%d.org" "Automatic file creation format based on date") + (org-journal-enable-agenda-integration t "All org-journal entries are org-agenda entries") + (org-journal-file-header "#+TITLE: Daily Journal\n#+STARTUP: showeverything\n#+DESCRIPTION: My daily journal entry\n#+AUTHOR: Preston Pan\n#+date:\n#+options: broken-links:t" "set header files on new org journal entry")) #+end_src ** Doom Modeline The default modeline is ugly. I replace it with the doom modeline because it's better. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package doom-modeline - :config - (doom-modeline-mode 1)) +(use-package doom-modeline + :config (doom-modeline-mode 1)) #+end_src *** Doom Theme I used to use catppuccin, but the doom themes are so good that I am willing to break some theme consistency with my desktop in order to use doom themes. I mean it looks better anyways if emacs is a distinct theme. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package doom-themes - :ensure t - :custom - (doom-themes-enable-bold t) - (doom-themes-enable-italic t) - (doom-themes-treemacs-theme "doom-rouge") - :config - (load-theme 'doom-rouge t) +(use-package doom-themes + :custom + (doom-themes-enable-bold t "use bold letters") + (doom-themes-enable-italic t "use italic letters") + (doom-themes-treemacs-theme "doom-colors" "set theme to something like catppuccin but doom") + :config + (unless noninteractive (doom-themes-config))) + +(use-package catppuccin-theme + :config (when noninteractive (try (load-theme 'catppuccin-theme t)))) - (doom-themes-visual-bell-config) - (doom-themes-treemacs-config) - (doom-themes-org-config)) - ;; (load-theme 'catppuccin :no-confirm) +(use-package solaire-mode + :after doom-themes + :config (solaire-global-mode +1)) #+end_src ** Grammar I want to write good! I grammar good too. @@ -401,239 +514,240 @@ I want to write good! I grammar good too. ** Make Org Look Better Org superstar adds those nice looking utf-8 bullets: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package org-superstar - :after (org) - :hook (org-mode . (lambda () (org-superstar-mode 1)))) +(use-package org-modern + :after (org) + :hook (org-mode . org-modern-mode) + :custom + (org-modern-block-fringe t) + (org-modern-block-name t) + (org-modern-star '("◉" "○" "◈" "◇")) + (org-modern-block-name '((t . t))) + (org-modern-keyword '((t . t))) + :config + (global-org-modern-mode)) #+end_src ** LSP We set up eglot, the LSP manager for emacs, now built in: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package lsp - :hook - (prog-mode . lsp)) - - (with-eval-after-load 'lsp-mode - (setq lsp-typescript-format-enable t - lsp-typescript-indent-size 4 - lsp-typescript-tab-size 4 - lsp-typescript-indent-style "spaces")) +(use-package lsp + :custom + (lsp-use-plists t) + (lsp-typescript-format-enable t) + (lsp-typescript-indent-size 4) + (lsp-typescript-tab-size 4) + (lsp-typescript-indent-style "spaces") + :hook ((prog-mode . lsp))) - (use-package editorconfig - :config - (editorconfig-mode 1)) +(use-package editorconfig + :config (editorconfig-mode 1)) - (use-package flycheck - :config (global-flycheck-mode)) +(use-package flycheck + :config (global-flycheck-mode)) - (use-package platformio-mode +(use-package platformio-mode :hook (prog-mode . platformio-conditionally-enable)) #+end_src *** C/C++ Specific configuration for C (I also use the clangd lsp): #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package irony - :hook ( - (c++-mode . irony-mode) - (c-mode . irony-mode) - (objc-mode . irony-mode) - (irony-mode . irony-cdb-autosetup-compile-options))) +(use-package irony + :hook ((c++-mode . irony-mode) + (c-mode . irony-mode) + (objc-mode . irony-mode) + (irony-mode . irony-cdb-autosetup-compile-options))) - (use-package irony-eldoc - :hook ((irony-mode . irony-eldoc))) +(use-package irony-eldoc + :hook ((irony-mode . irony-eldoc))) #+end_src *** Solidity For writing solidity: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package solidity-mode) - (use-package company-solidity) - (use-package solidity-flycheck - :custom - (solidity-flycheck-solc-checker-active t)) +(use-package solidity-mode) +(use-package company-solidity + :after company) +(use-package solidity-flycheck + :after flycheck + :custom (solidity-flycheck-solc-checker-active t)) #+end_src ** Projectile Manages projects and shit. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package projectile - :custom - (projectile-project-search-path '("~/org" "~/src" "~/monorepo" "~/projects") "search path for projects") - :config - (projectile-mode +1)) +(use-package projectile + :custom + (projectile-project-search-path '("~/org" "~/src" "~/monorepo" "~/projects") "search path for projects") + :config (projectile-mode +1)) #+end_src ** Dashboard We want our emacs initialization to be pretty and display useful things. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package dashboard - :after (projectile) - :custom - (dashboard-banner-logo-title "Welcome, Commander!" "Set title for dashboard") - (dashboard-icon-type 'nerd-icons "Use nerd icons") - (dashboard-vertically-center-content t "Center content") - (dashboard-set-init-info t) - (dashboard-week-agenda t "Agenda in dashboard") - (dashboard-items '((recents . 5) - (bookmarks . 5) - (projects . 5) - (agenda . 5) - (registers . 5)) "Look at some items") - :config - (dashboard-setup-startup-hook)) +(use-package dashboard + :after (projectile) + :custom + (dashboard-banner-logo-title "Welcome, Commander!" "Set title for dashboard") + (dashboard-icon-type 'nerd-icons "Use nerd icons") + (dashboard-vertically-center-content t "Center content") + (dashboard-set-init-info t) + (dashboard-week-agenda t "Agenda in dashboard") + (dashboard-items '((recents . 5) + (bookmarks . 5) + (projects . 5) + (agenda . 5) + (registers . 5)) "Look at some items") + :config + (dashboard-setup-startup-hook)) #+end_src ** Ivy Ivy is a pretty cool general program for displaying stuff: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package counsel) - - (use-package ivy - :custom - (ivy-use-virtual-buffers t "Make searching more efficient") - (enable-recursive-minibuffers t "Don't get soft locked when in a minibuffer") - :bind - ("C-s" . swiper) - ("C-c C-r" . ivy-resume) - ("M-x" . counsel-M-x) - ("C-x C-f" . counsel-find-file) - (" f" . counsel-describe-function) - (" v" . counsel-describe-variable) - (" o" . counsel-describe-symbol) - (" l" . counsel-find-library) - (" i" . counsel-info-lookup-symbol) - (" u" . counsel-unicode-char) - ("C-c g" . counsel-git) - ("C-c j" . counsel-git-grep) - ("C-c k" . counsel-ag) - ("C-x l" . counsel-locate) - :config - (ivy-mode)) - (define-key ivy-minibuffer-map (kbd "C-j") 'ivy-immediate-done) +(use-package ivy + :demand t + :custom + (ivy-use-virtual-buffers t "Make searching more efficient") + (enable-recursive-minibuffers t "Don't get soft locked when in a minibuffer") + :bind + ("C-j" . ivy-immediate-done) + ("C-c C-r" . ivy-resume) + :init (ivy-mode) + :config (ivy-rich-mode)) + +(use-package counsel + :after ivy + :bind + ("M-x" . counsel-M-x) + ("C-x C-f" . counsel-find-file) + (" f" . counsel-describe-function) + (" v" . counsel-describe-variable) + (" o" . counsel-describe-symbol) + (" l" . counsel-find-library) + (" i" . counsel-info-lookup-symbol) + (" u" . counsel-unicode-char) + ("C-c g" . counsel-git) + ("C-c j" . counsel-git-grep) + ("C-c k" . counsel-ag) + ("C-x l" . counsel-locate)) + +(use-package swiper + :after ivy + :bind ("C-s" . swiper)) + +(use-package ivy-posframe + :custom + (ivy-posframe-display-functions-alist '((t . ivy-posframe-display))) + :config (ivy-posframe-mode 1)) + +(use-package all-the-icons-ivy-rich + :after (ivy all-the-icons) + :config (all-the-icons-ivy-rich-mode 1)) #+end_src I use it for an M-x replacement and a dired replacement, among other things. ** Magit I use magit in order to do all my git management in emacs. #+begin_src emacs-lisp :tangle ../nix/init.el (use-package magit) +(use-package git-gutter + :config + (global-git-gutter-mode +1)) #+end_src ** IRC Configure IRC to use my username. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package erc - :hook - ((erc-mode . erc-notifications-mode)) - :custom - (erc-nick system-username "sets erc username to the one set in nix config") - (erc-user-full-name system-fullname "sets erc fullname to the one set in nix config")) +(use-package erc + :hook ((erc-mode . erc-notifications-mode)) + :custom + (erc-nick system-username "sets erc username to the one set in nix config") + (erc-user-full-name system-fullname "sets erc fullname to the one set in nix config")) #+end_src ** Keybindings Global keybindings for everything that I care about globally. It's all here! I use general to manage my global keybindings in a declarative way. These are in part inspired by the doom emacs keybindings. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package general - :init - (defun znc () - (interactive) - (erc-tls :server "ret2pop.net" - :port "5000")) - - (defun prestonpan () - (interactive) - (erc-tls :server "nullring.xyz" - :port "6697")) - - (defun liberachat () - (interactive) - (erc-tls :server "irc.libera.chat" - :port "6697")) - - (defun efnet () - (interactive) - (erc-tls :server "irc.prison.net" - :port "6697")) - - (defun matrix-org () - (interactive) - (ement-connect)) - - (defun gimp-org () - (interactive) - (erc-tls :server "irc.gimp.org" - :port "6697")) - - :config - (general-create-definer leader-key :prefix "SPC") - (leader-key 'normal - "o c" '(org-capture :wk "Capture") - - ;; Org Mode - "n" '(:ignore t :wk "Org mode plugins") - "n j j" '(org-journal-new-entry :wk "Make new journal entry") - "n r f" '(org-roam-node-find :wk "Find roam node") - "n r i" '(org-roam-node-insert :wk "Insert roam node") - "n r a" '(org-roam-alias-add :wk "Add alias to org roam node") - "n r g" '(org-roam-graph :wk "Graph roam database") - "m I" '(org-id-get-create :wk "Make org id") - - ;; Programming Projects - "." '(counsel-find-file :wk "find file") - "p a" '(projectile-add-known-project :wk "Add to project list") - - "N f" '(nix-flake :wk "nix flake menu") - "f" '(:ignore t :wk "file operations") - "f p" '(projectile-switch-project :wk "find project to switch to") - "f f" '(counsel-fzf :wk "find file in project") - "f s" '(counsel-rg :wk "find string in project") - - "y n s" '(yas-new-snippet :wk "Create new snippet") - - "g" '(:ignore t :wk "Magit") - "g /" '(magit-dispatch :wk "git commands") - "g P" '(magit-push :wk "git push") - "g c" '(magit-commit :wk "git commit") - "g p" '(magit-pull :wk "Pull from git") - "g s" '(magit-status :wk "Change status of files") - "g i" '(magit-init :wk "init new git project") - "g r" '(magit-rebase :wk "Rebase branch") - "g m" '(magit-merge :wk "Merge branches") - "g b" '(magit-branch :wk "Git branch") - - "o p" '(treemacs :wk "Project Drawer") - "o P" '(treemacs-projectile :wk "Import Projectile project to treemacs") - - "w r" '(writeroom-mode :wk "focus mode for writing") - - ;; Applications - "o" '(:ignore t :wk "Open application") - "o t" '(vterm :wk "Terminal") - "o e" '(eshell :wk "Elisp Interpreter") - "o m" '(mu4e :wk "Email") - "o M" '(matrix-org :wk "Connect to matrix") - "o r s" '(elfeed :wk "rss feed") - "o a" '(org-agenda :wk "Open agenda") - "o w" '(eww :wk "web browser") - "m m" '(emms :wk "Music player") - "s m" '(proced :wk "System Manager") - "l p" '(list-processes :wk "List Emacs Processes") - - "m P p" '(org-publish :wk "Publish website components") - "s e" '(sudo-edit :wk "Edit file with sudo") - - ;; "f f" '(eglot-format :wk "Format code buffer") - "i p c" '(prestonpan :wk "Connect to my IRC server") - "i l c" '(liberachat :wk "Connect to libera chat server") - "i e c" '(efnet :wk "Connect to efnet chat server") - "i g c" '(gimp-org :wk "Connect to gimp chat server") - "i z c" '(znc :wk "Connect to my ZNC instance") - - ;; Documentation - "h" '(:ignore t :wk "Documentation") - "h v" '(counsel-describe-variable :wk "Describe variable") - "h f" '(counsel-describe-function :wk "Describe function") - "h h" '(help :wk "Help") - "h m" '(woman :wk "Manual") - "h i" '(info :wk "Info") - - "s i p" '(insert-urandom-password :wk "insert random password to buffer (for sops)") - - "h r r" '(lambda () (interactive) (org-babel-load-file (expand-file-name "~/monorepo/config/emacs.org"))))) +(use-package general + :after (evil evil-collection) + :init (general-create-definer leader-key :prefix "SPC") + :config + ;; these are just bindings but the symbols are all lazily handled by general + (create-irc-servers + (znc "ret2pop.net" "5000") + (prestonpan "nullring.xyz" "6697") + (libera-chat "irc.libera.chat" "6697") + (efnet "irc.prison.net" "6697") + (matrix-org "matrix.org" "8448") + (gimp-org "irc.gimp.org" "6697")) + + (leader-key 'normal + "o c" '(org-capture :wk "Capture") + ;; Org Mode + "n" '(:ignore t :wk "Org mode plugins") + "n j j" '(org-journal-new-entry :wk "Make new journal entry") + "n r f" '(org-roam-node-find :wk "Find roam node") + "n r i" '(org-roam-node-insert :wk "Insert roam node") + "n r a" '(org-roam-alias-add :wk "Add alias to org roam node") + "n r g" '(org-roam-graph :wk "Graph roam database") + "m I" '(org-id-get-create :wk "Make org id") + + ;; Programming Projects + "." '(counsel-find-file :wk "find file") + "p a" '(projectile-add-known-project :wk "Add to project list") + + "N f" '(nix-flake :wk "nix flake menu") + "f" '(:ignore t :wk "file operations") + "f p" '(projectile-switch-project :wk "find project to switch to") + "f f" '(counsel-fzf :wk "find file in project") + "f s" '(counsel-rg :wk "find string in project") + + "y n s" '(yas-new-snippet :wk "Create new snippet") + + "g" '(:ignore t :wk "Magit") + "g /" '(magit-dispatch :wk "git commands") + "g P" '(magit-push :wk "git push") + "g c" '(magit-commit :wk "git commit") + "g p" '(magit-pull :wk "Pull from git") + "g s" '(magit-status :wk "Change status of files") + "g i" '(magit-init :wk "init new git project") + "g r" '(magit-rebase :wk "Rebase branch") + "g m" '(magit-merge :wk "Merge branches") + "g b" '(magit-branch :wk "Git branch") + + "o p" '(treemacs :wk "Project Drawer") + "o P" '(treemacs-projectile :wk "Import Projectile project to treemacs") + + "w r" '(writeroom-mode :wk "focus mode for writing") + + ;; Applications + "o" '(:ignore t :wk "Open application") + "o t" '(vterm :wk "Terminal") + "o e" '(eshell :wk "Elisp Interpreter") + "o m" '(mu4e :wk "Email") + "o M" '(matrix-org :wk "Connect to matrix") + "o r s" '(elfeed :wk "rss feed") + "o a" '(org-agenda :wk "Open agenda") + "o w" '(eww :wk "web browser") + "m m" '(emms :wk "Music player") + "s m" '(proced :wk "System Manager") + "l p" '(list-processes :wk "List Emacs Processes") + + "m P p" '(org-publish :wk "Publish website components") + "s e" '(sudo-edit :wk "Edit file with sudo") + + ;; "f f" '(eglot-format :wk "Format code buffer") + "i p c" '(prestonpan :wk "Connect to my IRC server") + "i l c" '(liberachat :wk "Connect to libera chat server") + "i e c" '(efnet :wk "Connect to efnet chat server") + "i g c" '(gimp-org :wk "Connect to gimp chat server") + "i z c" '(znc :wk "Connect to my ZNC instance") + + ;; Documentation + "h" '(:ignore t :wk "Documentation") + "h v" '(counsel-describe-variable :wk "Describe variable") + "h f" '(counsel-describe-function :wk "Describe function") + "h h" '(help :wk "Help") + "h m" '(woman :wk "Manual") + "h i" '(info :wk "Info") + + "s i p" '(insert-urandom-password :wk "insert random password to buffer (for sops)") + + "h r r" '(lambda () (interactive) (load-file (expand-file-name "~/monorepo/nix/init.el"))))) #+end_src ** LLM I use LLMs in order to help me come up with ideas. I use a local LLM so that I can have a @@ -642,228 +756,224 @@ competitive LLM that doesn't cost money. Minuet does my code completion, showing the potential code completion as a ghost and automatically completing the code when my cursor is still. It is kind of like copilot but it works with local LLMs, which is better. Though, it's obviously not always the most accurate. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package minuet - :bind - (("M-y" . #'minuet-complete-with-minibuffer) - ("C-c m" . #'minuet-show-suggestion) - :map minuet-active-mode-map - ("C-c r" . #'minuet-dismiss-suggestion) - ("TAB" . #'minuet-accept-suggestion)) - - :init - (add-hook 'prog-mode-hook #'minuet-auto-suggestion-mode) - - :custom - (minuet-request-timeout 40 "Max timeout in seconds") - (minuet-provider 'openai-fim-compatible "FIM compatible OpenAI-like API (Ollama)") - (minuet-n-completions 1 "I am using ghost text so I only need one possible completion") - (minuet-context-window 1024 "how much context do I want?") - - :config - (plist-put minuet-openai-fim-compatible-options :end-point "http://localhost:11434/v1/completions") - - (plist-put minuet-openai-fim-compatible-options :name "Ollama") - (plist-put minuet-openai-fim-compatible-options :api-key "TERM") - (plist-put minuet-openai-fim-compatible-options :model "qwen2.5-coder:14b") - - (minuet-set-optional-options minuet-openai-fim-compatible-options :max_tokens 50)) +(use-package minuet + :bind + (("M-y" . #'minuet-complete-with-minibuffer) + ("C-c m" . #'minuet-show-suggestion) + :map minuet-active-mode-map + ("C-c r" . #'minuet-dismiss-suggestion) + ("TAB" . #'minuet-accept-suggestion)) + :hook ((prog-mode-hook . minuet-auto-suggestion-mode)) + :custom + (minuet-request-timeout 40 "Max timeout in seconds") + (minuet-provider 'openai-fim-compatible "FIM compatible OpenAI-like API (Ollama)") + (minuet-n-completions 1 "I am using ghost text so I only need one possible completion") + (minuet-context-window 1024 "how much context do I want?") + (minuet-openai-fim-compatible-options + '( + :end-point "http://localhost:11434/v1/completions" + :name "Ollama" + :api-key "TERM" + :template ( + :prompt minuet--default-fim-prompt-function + :suffix minuet--default-fim-suffix-function) + :transform () + :get-text-fn minuet--openai-fim-get-text-fn + :optional (:max-tokens 50) + :model "qwen2.5-coder:14b"))) #+end_src ** RSS Feed I use really simple syndication (RSS) in order to read news. As a result, I use elfeed to fetch feeds found on my website: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package elfeed - :custom - (elfeed-search-filter "@1-month-ago +unread" "Only display unread articles from a month ago") +(use-package elfeed + :hook ((elfeed-search-mode . elfeed-update)) + :custom (elfeed-search-filter "@1-month-ago +unread" "Only display unread articles from a month ago") + :config (run-with-timer 0 (* 60 3) 'elfeed-update)) - :config - (run-with-timer 0 (* 60 60 4) 'elfeed-update) - - :hook ((elfeed-search-mode . elfeed-update))) - - (use-package elfeed-org - :custom - (rmh-elfeed-org-files '("~/monorepo/config/elfeed.org") "Use elfeed config in repo as default") - :config - (elfeed-org)) +(use-package elfeed-org + :after (elfeed org) + :demand t + :custom (rmh-elfeed-org-files '("~/monorepo/config/elfeed.org") "Use elfeed config in repo as default") + :config (elfeed-org)) #+end_src *** Youtube Then we set up elfeed-tube for Youtube video RSS feeds (so I don't ever have to use the web interface and can control it from emacs): #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package elfeed-tube - :after elfeed - :demand t - :config - (elfeed-tube-setup) - :bind (:map elfeed-show-mode-map - ("F" . elfeed-tube-fetch) - ([remap save-buffer] . elfeed-tube-save) - :map elfeed-search-mode-map - ("F" . elfeed-tube-fetch) - ([remap save-buffer] . elfeed-tube-save))) - - (use-package elfeed-tube-mpv - :bind (:map elfeed-show-mode-map - ("C-c C-f" . elfeed-tube-mpv-follow-mode) - ("C-c C-c" . elfeed-tube-mpv) - ("C-c C-w" . elfeed-tube-mpv-where) - :map elfeed-search-mode-map - ("M" . elfeed-tube-mpv))) +(use-package elfeed-tube + :after elfeed + :demand t + :bind (:map elfeed-show-mode-map + ("F" . elfeed-tube-fetch) + ([remap save-buffer] . elfeed-tube-save) + :map elfeed-search-mode-map + ("F" . elfeed-tube-fetch) + ([remap save-buffer] . elfeed-tube-save)) + :config (elfeed-tube-setup)) + +(use-package elfeed-tube-mpv + :bind (:map elfeed-show-mode-map + ("C-c C-f" . elfeed-tube-mpv-follow-mode) + ("C-c C-c" . elfeed-tube-mpv) + ("C-c C-w" . elfeed-tube-mpv-where) + :map elfeed-search-mode-map + ("M" . elfeed-tube-mpv))) #+end_src ** Project Drawer I use treemacs as my sidebar for projects, so that I can easily navigate to any file in the project directory. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package treemacs) - (use-package treemacs-evil - :after (treemacs evil)) - (use-package treemacs-projectile - :after (treemacs projectile)) - (use-package treemacs-magit - :after (treemacs magit)) +(use-package treemacs + :after doom-themes) + +(use-package treemacs-evil + :after (treemacs evil)) + +(use-package treemacs-projectile + :after (treemacs projectile)) + +(use-package treemacs-magit + :after (treemacs magit)) + +(use-package treemacs-all-the-icons + :after (treemacs all-the-icons)) #+end_src ** Eww Used only for the purpose of viewing RSS feed items in emacs if I can, only resorting to Chromium if I have to: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package eww - :custom - (search-engines - '((("google" "g") "https://google.com/search?q=%s") - (("duckduckgo" "d" "ddg") "https://duckduckgo.com/?q=%s") - (("rfc" "r") "https://www.rfc-editor.org/rfc/rfc%s.txt") - (("rfc-kw" "rk") "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s")) - "use this set of search engines") - - (search-engine-default "google" "Use google as default") - (eww-search-prefix "https://google.com/search?q=" "Google prefix") - :hook ((eww-mode . (lambda () (local-set-key (kbd "y Y") #'eww-copy-page-url))))) +(use-package eww + :bind (:map eww-mode-map + ("y Y" . eww-copy-page-url)) + :custom + (search-engines + '((("google" "g") "https://google.com/search?q=%s") + (("duckduckgo" "d" "ddg") "https://duckduckgo.com/?q=%s") + (("rfc" "r") "https://www.rfc-editor.org/rfc/rfc%s.txt") + (("rfc-kw" "rk") "https://www.rfc-editor.org/search/rfc_search_detail.php?title=%s")) + "use this set of search engines") + (search-engine-default "google" "Use google as default") + (eww-search-prefix "https://google.com/search?q=" "Google prefix")) #+end_src ** Nix Mode Load Nix mode so our exported website has syntax highlighting for Nix blocks. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package nix-mode - :mode "\\.nix\\'") +(use-package nix-mode + :mode "\\.nix\\'") #+end_src ** Org Roam For all my mathematics and programming notes: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package org-roam - :after (org) - :custom - (org-roam-db-update-on-save t "Update org-roam db") - (org-roam-graph-viewer "librewolf" "Use librewolf to view org-roam graph") - (org-roam-directory (file-truename "~/monorepo/mindmap") "Set org-roam directory inside monorepo") - (org-roam-capture-templates '(("d" "default" plain "%?" - :target (file+head "${title}.org" - "#+title: ${title}\n#+author: Preston Pan\n#+description:\n#+options: broken-links:t") - :unnarrowed t)) "org-roam files start with this snippet by default") - :config - (org-roam-db-autosync-mode) - ;; Otherwise links are broken when publishing - (org-roam-update-org-id-locations)) - - (use-package org-roam-ui - :after org-roam - :hook (after-init . org-roam-ui-mode) - :custom - (org-roam-ui-sync-theme t "Use emacs theme for org-roam-ui") - (org-roam-ui-follow t "Have cool visual while editing org-roam") - (org-roam-ui-update-on-save t "This option is obvious") - (org-roam-ui-open-on-start t "Have cool visual open in librewolf when emacs loads")) +(use-package org-roam + :after (org) + :custom + (org-roam-db-update-on-save t "Update org-roam db") + (org-roam-graph-viewer "librewolf" "Use librewolf to view org-roam graph") + (org-roam-directory (file-truename "~/monorepo/mindmap") "Set org-roam directory inside monorepo") + (org-roam-capture-templates '(("d" "default" plain "%?" + :target (file+head "${title}.org" + "#+title: ${title}\n#+author: Preston Pan\n#+description:\n#+options: broken-links:t") + :unnarrowed t)) "org-roam files start with this snippet by default") + :config (org-roam-config)) + +(unless noninteractive (use-package org-roam-ui + :after org-roam + :hook (after-init . org-roam-ui-mode) + :custom + (org-roam-ui-sync-theme t "Use emacs theme for org-roam-ui") + (org-roam-ui-follow t "Have cool visual while editing org-roam") + (org-roam-ui-update-on-save t "This option is obvious") + (org-roam-ui-open-on-start t "Have cool visual open in librewolf when emacs loads"))) #+end_src ** Pinentry Set up pinentry so that I can use emacs as my pinentry frontend: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package pinentry - :custom (epa-pinentry-mode `loopback "Set this option to match gpg-agent.conf") - :config (pinentry-start)) +(unless noninteractive (use-package pinentry + :custom (epa-pinentry-mode `loopback "Set this option to match gpg-agent.conf") + :config (pinentry-start))) #+end_src ** Email Email in emacs can be done with Mu4e. #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package smtpmail - :custom - (user-mail-address system-email "Use our email") - (user-full-name system-fullname "Use our full name") - (sendmail-program "msmtp" "Use msmtp in order to send emails") - (send-mail-function 'smtpmail-send-it "This is required for this to work") - (message-sendmail-f-is-evil t "Use evil-mode for sendmail") - (message-sendmail-extra-arguments '("--read-envelope-from") "idk what this does") - (message-send-mail-function 'message-send-mail-with-sendmail "Use sendmail")) - - (use-package mu4e - :after smtpmail - :hook - ((mu4e-compose-mode . mml-secure-message-sign-pgpmime)) - :custom - (mu4e-drafts-folder "/Drafts" "Set drafts folder mu db") - (mu4e-sent-folder "/Sent" "Set sent folder in mu db") - (mu4e-trash-folder "/Trash" "Set trash folder in mu db") - (mu4e-attachment-dir "~/Downloads" "Set downloads folder for attachments") - (mu4e-view-show-addresses 't "Show email addresses in main view") - (mu4e-confirm-quit nil "Don't ask to quit") - (message-kill-buffer-on-exit t "Kill buffer when I exit mu4e") - (mu4e-compose-dont-reply-to-self t "Don't include self in replies") - (mu4e-change-filenames-when-moving t) - (mu4e-get-mail-command (concat "mbsync " system-username) "Use mbsync for imap") - (mu4e-compose-reply-ignore-address (list "no-?reply" system-email) "ignore my own address and noreply") - (mu4e-html2text-command "w3m -T text/html" "Use w3m to convert html to text") - (mu4e-update-interval 300 "Update duration") - (mu4e-headers-auto-update t "Auto-updates feed") - (mu4e-view-show-images t "Shows images") - (mu4e-compose-signature-auto-include nil) - (mml-secure-openpgp-sign-with-sender t) - (mml-secure-openpgp-signers (list system-gpgkey)) - (mail-user-agent 'mu4e-user-agent) - (message-mail-user-agent 'mu4e-user-agent) - (mu4e-use-fancy-chars t "Random option to make mu4e look nicer")) +(use-package smtpmail + :custom + (user-mail-address system-email "Use our email") + (user-full-name system-fullname "Use our full name") + (sendmail-program "msmtp" "Use msmtp in order to send emails") + (send-mail-function 'smtpmail-send-it "This is required for this to work") + (message-sendmail-f-is-evil t "Use evil-mode for sendmail") + (message-sendmail-extra-arguments '("--read-envelope-from") "idk what this does") + (message-send-mail-function 'message-send-mail-with-sendmail "Use sendmail")) + +(use-package mu4e + :after smtpmail + :hook + ((mu4e-compose-mode . mml-secure-message-sign-pgpmime)) + :custom + (mu4e-drafts-folder "/Drafts" "Set drafts folder mu db") + (mu4e-sent-folder "/Sent" "Set sent folder in mu db") + (mu4e-trash-folder "/Trash" "Set trash folder in mu db") + (mu4e-attachment-dir "~/Downloads" "Set downloads folder for attachments") + (mu4e-view-show-addresses 't "Show email addresses in main view") + (mu4e-confirm-quit nil "Don't ask to quit") + (message-kill-buffer-on-exit t "Kill buffer when I exit mu4e") + (mu4e-compose-dont-reply-to-self t "Don't include self in replies") + (mu4e-change-filenames-when-moving t) + (mu4e-get-mail-command (concat "mbsync " system-username) "Use mbsync for imap") + (mu4e-compose-reply-ignore-address (list "no-?reply" system-email) "ignore my own address and noreply") + (mu4e-html2text-command "w3m -T text/html" "Use w3m to convert html to text") + (mu4e-update-interval 300 "Update duration") + (mu4e-headers-auto-update t "Auto-updates feed") + (mu4e-view-show-images t "Shows images") + (mu4e-compose-signature-auto-include nil) + (mml-secure-openpgp-sign-with-sender t) + (mml-secure-openpgp-signers (list system-gpgkey)) + (mail-user-agent 'mu4e-user-agent) + (message-mail-user-agent 'mu4e-user-agent) + (mu4e-use-fancy-chars t "Random option to make mu4e look nicer")) #+end_src ** Music Set up emms in order to play music from my music directory: #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package emms - :custom - (emms-source-file-default-directory (expand-file-name "~/music/") "Use directory specified in Nix") - (emms-player-mpd-music-directory (expand-file-name "~/music/") "Use directory specified in Nix") - (emms-player-mpd-server-name "localhost" "Connect to localhost") - (emms-player-mpd-server-port "6600" "Connect to port 6600") - (emms-player-list '(emms-player-mpd) "Use mpd") - (emms-lyrics-display-on-modeline t) - :hook - ((emms-playlist-mode . emms-lyrics-mode) - (emms-player-started . emms-lyrics-lrclib-get)) - :init - (emms-all) - (add-to-list 'emms-info-functions 'emms-info-mpd) - (add-to-list 'emms-player-list 'emms-player-mpd) - :config (emms-player-mpd-connect)) +(unless noninteractive (use-package emms + :custom + (emms-source-file-default-directory (expand-file-name "~/music/") "Use directory specified in Nix") + (emms-player-mpd-music-directory (expand-file-name "~/music/") "Use directory specified in Nix") + (emms-player-mpd-server-name "localhost" "Connect to localhost") + (emms-player-mpd-server-port "6600" "Connect to port 6600") + (emms-player-list '(emms-player-mpd) "Use mpd") + (emms-lyrics-display-on-modeline t "Display lyrics for reading") + (emms-info-functions '(emms-info-mpd emms-info-native emms-info-cueinfo) "functions for displaying information about tracks") + :hook + ((emms-playlist-mode . emms-lyrics-mode) + (emms-player-started . emms-lyrics-lrclib-get)) + :init (emms-all) + :config (emms-player-mpd-connect))) #+end_src ** Tabs I use tabs because sometimes I like using the mouse (it's actually more efficient to have the option for both, trust me. Keyboards aren't all it). #+begin_src emacs-lisp :tangle ../nix/init.el - (use-package centaur-tabs - :custom - (centaur-tabs-set-icons t "use icons for centaur-tabs") - (centaur-tabs-set-modified-marker t "show when buffer modified") - (centaur-tabs-icon-type 'all-the-icons "use all-the-icons for icons") - :demand - :config - (centaur-tabs-mode t) - :bind - ("C-" . centaur-tabs-backward) - ("C-" . centaur-tabs-forward)) +(use-package centaur-tabs + :custom + (centaur-tabs-set-icons t "use icons for centaur-tabs") + (centaur-tabs-set-modified-marker t "show when buffer modified") + (centaur-tabs-icon-type 'all-the-icons "use all-the-icons for icons") + :bind + ("C-" . centaur-tabs-backward) + ("C-" . centaur-tabs-forward) + :demand t + :config (centaur-tabs-mode t)) #+end_src * Unpinned ** Lean4 For some reason, lean4-mode is not in MELPA currently so I have to do this ugly thing: #+begin_src emacs-lisp :tangle ../nix/init.el - (unless noninteractive (use-package lean4-mode - :commands lean4-mode - :vc (:url "https://github.com/leanprover-community/lean4-mode.git" - :rev "76895d8939111654a472cfc617cfd43fbf5f1eb6"))) +(unless noninteractive (use-package lean4-mode + :commands lean4-mode + :vc (:url "https://github.com/leanprover-community/lean4-mode.git" + :rev "76895d8939111654a472cfc617cfd43fbf5f1eb6"))) #+end_src and actually pull something from the internet instead of pinning. Thankfully this reproduction issue is probably localized to lean files. Also, we're pulling a specific commit so it is still pinned. If it fails to fetch, lean4 is broken I guess. -- cgit v1.3 From 1f04e4d007d7fd56d997e2148b7d01db444f0495 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sat, 14 Mar 2026 11:56:02 -0700 Subject: remove headers --- config/emacs.org | 18 ++++++++++--- flake.nix | 63 ++++++--------------------------------------- index.org | 2 +- journal/.#20251227.org | 1 - journal/20230609.org | 1 - journal/20230610.org | 1 - journal/20230611.org | 1 - journal/20230613.org | 3 --- journal/20230614.org | 3 --- journal/20230615.org | 3 --- journal/20230616.org | 3 --- journal/20230619.org | 3 --- journal/20230620.org | 3 --- journal/20230621.org | 3 --- journal/20230622.org | 3 --- journal/20230623.org | 3 --- journal/20230624.org | 3 --- journal/20230625.org | 3 --- journal/20230704.org | 3 --- journal/20230711.org | 3 --- journal/20231208.org | 3 --- journal/20231209.org | 3 --- journal/20231210.org | 3 --- journal/20231213.org | 3 --- journal/20231214.org | 3 --- journal/20231215.org | 3 --- journal/20231217.org | 3 --- journal/20231220.org | 3 --- journal/20240110.org | 3 --- journal/20240123.org | 3 --- journal/20240124.org | 3 --- journal/20240125.org | 3 --- journal/20240126.org | 3 --- journal/20240127.org | 3 --- journal/20240128.org | 3 --- journal/20240205.org | 3 --- journal/20240210.org | 3 --- journal/20240226.org | 3 --- journal/20240228.org | 3 --- journal/20240229.org | 3 --- journal/20240301.org | 3 --- journal/20240306.org | 3 --- journal/20240309.org | 3 --- journal/20240310.org | 3 --- journal/20240311.org | 3 --- journal/20240312.org | 3 --- journal/20240313.org | 3 --- journal/20240314.org | 3 --- journal/20240315.org | 3 --- journal/20240316.org | 3 --- journal/20240317.org | 3 --- journal/20240318.org | 3 --- journal/20240319.org | 3 --- journal/20240321.org | 3 --- journal/20240323.org | 3 --- journal/20240324.org | 3 --- journal/20240329.org | 3 --- journal/20240330.org | 3 --- journal/20240404.org | 3 --- journal/20240416.org | 3 --- journal/20240502.org | 3 --- journal/20240503.org | 3 --- journal/20240510.org | 3 --- journal/20240512.org | 3 --- journal/20240519.org | 3 --- journal/20240524.org | 3 --- journal/20240530.org | 3 --- journal/20240531.org | 3 --- journal/20240601.org | 3 --- journal/20240602.org | 3 --- journal/20240605.org | 3 --- journal/20240610.org | 3 --- journal/20240924.org | 3 --- journal/20241230.org | 3 --- journal/20250102.org | 3 --- journal/20250103.org | 3 --- journal/20250106.org | 3 --- journal/20250108.org | 3 --- journal/20250111.org | 3 --- journal/20250112.org | 3 --- journal/20250116.org | 3 --- journal/20250119.org | 3 --- journal/20250123.org | 3 --- journal/20250201.org | 3 --- journal/20250203.org | 3 --- journal/20250211.org | 3 --- journal/20250214.org | 3 --- journal/20250218.org | 3 --- journal/20250220.org | 3 --- journal/20250222.org | 3 --- journal/20250302.org | 3 --- journal/20250305.org | 3 --- journal/20250308.org | 3 --- journal/20250310.org | 3 --- journal/20250311.org | 3 --- journal/20250313.org | 3 --- journal/20250317.org | 3 --- journal/20250321.org | 3 --- journal/20250602.org | 3 --- journal/20250626.org | 3 --- journal/20250703.org | 3 --- journal/20250720.org | 3 --- journal/20250723.org | 3 --- journal/20250826.org | 3 --- journal/20250908.org | 3 --- journal/20250909.org | 3 --- journal/20250912.org | 3 --- journal/20250914.org | 3 --- journal/20250915.org | 3 --- journal/20250916.org | 3 --- journal/20250917.org | 3 --- journal/20250924.org | 3 --- journal/20250928.org | 3 --- journal/20260129.org | 3 --- journal/20260314.org | 14 ++++++++++ journal/index.org | 7 ----- nix | 2 +- tests/ci-build-stage-two.el | 47 +++++++++++++++++++++++++++++++++ tests/ci-build.el | 43 +++++++++++++++++++++++++++++++ tests/ci-runner.el | 9 +++++++ 120 files changed, 137 insertions(+), 393 deletions(-) delete mode 120000 journal/.#20251227.org create mode 100644 journal/20260314.org create mode 100644 tests/ci-build-stage-two.el create mode 100644 tests/ci-build.el create mode 100644 tests/ci-runner.el (limited to 'config/emacs.org') diff --git a/config/emacs.org b/config/emacs.org index 5df511e..9de6f61 100644 --- a/config/emacs.org +++ b/config/emacs.org @@ -205,6 +205,7 @@ of course Emacs was not designed to be fully imperative. This is my org mode configuration, which also configures latex. #+begin_src emacs-lisp :tangle ../nix/init.el (use-package org + :demand t :after (f s dash nix-mode) :hook ((org-mode-hook . remove-annoying-pairing)) @@ -276,8 +277,14 @@ This is my org mode configuration, which also configures latex. (org-habit-show-habits-only-for-today nil "See org habit entries") (org-habit-show-all-today t "Show org habit graph")) -(use-package htmlize - :after (doom-themes catppuccin-theme)) +(when noninteractive + (use-package htmlize + :demand t + :after (catppuccin-theme))) + +(unless noninteractive + (use-package htmlize + :after (doom-themes))) (use-package ox-latex :after (org) @@ -286,6 +293,7 @@ This is my org mode configuration, which also configures latex. (org-latex-pdf-process '("xelatex -interaction=nonstopmode -output-directory=%o %f") "set xelatex as default")) (use-package ox-html + :demand t :after (org htmlize) :custom (org-html-htmlize-output-type 'css "allow styling from CSS file") @@ -304,6 +312,7 @@ This is my org mode configuration, which also configures latex. :config (advice-add 'org-html-latex-environment :around #'org-html-latex-environment-pandoc-fix)) (use-package ox-publish + :demand t :after (org f s dash ox-html) :custom (org-publish-project-alist @@ -322,6 +331,8 @@ This is my org mode configuration, which also configures latex. (->> (create-htmlize-css) (s-replace-regexp "]*>" "") (s-replace "" "") + (s-replace "\n" "") + (s-replace "/*]]>*/-->" "") (s-trim) (minify-css)) (f-read-text "~/monorepo/style.css" 'utf-8) @@ -593,8 +604,7 @@ We want our emacs initialization to be pretty and display useful things. (projects . 5) (agenda . 5) (registers . 5)) "Look at some items") - :config - (dashboard-setup-startup-hook)) + :config (unless noninteractive (dashboard-setup-startup-hook))) #+end_src ** Ivy Ivy is a pretty cool general program for displaying stuff: diff --git a/flake.nix b/flake.nix index e5e306a..6173e6a 100644 --- a/flake.nix +++ b/flake.nix @@ -256,62 +256,15 @@ export FONTCONFIG_PATH=${pkgs.fontconfig.out}/etc/fonts/ export XDG_CACHE_HOME=$TMPDIR/.cache printf "hello?\n" -xvfb-run -a emacs -q \ - --eval '(setq inhibit-startup-screen t)' \ - --eval '(setq inhibit-startup-message t)' \ - --eval '(setq enable-local-variables :all)' \ - --eval '(defalias (quote yes-or-no-p) (lambda (&rest args) t))' \ - --eval '(defalias (quote y-or-n-p) (lambda (&rest args) t))' \ - --eval '(setq message-log-max t)' \ - --eval '(setq standard-output (quote external-debugging-output))' \ - --eval '(princ "STEP 0: tf\n" (quote external-debugging-output))' \ - --eval '(setq noninteractive t)' \ - --eval '(setq system-email "lol@troll.com")' \ - --eval '(setq system-username "ci-runner")' \ - --eval '(setq system-fullname "Preston Pan")' \ - --eval '(setq system-gpgkey "00000000")' \ - --eval '(defun package-vc-install (&rest args) (message "blocked package-vc-install for %s" args))' \ - --eval '(defun package-vc--unpack (&rest args) nil)' \ - --eval '(setq package-archives nil)' \ - --eval '(setq use-package-always-ensure nil)' \ - --eval '(setq package-vc-selected-packages nil)' \ - --eval '(defalias (quote scroll-bar-mode) (quote ignore))' \ - --eval '(defalias (quote tool-bar-mode) (quote ignore))' \ - --eval '(defalias (quote menu-bar-mode) (quote ignore))' \ - --eval '(provide (quote lean4-mode))' \ - --eval '(provide (quote irony-mode))' \ - --eval '(provide (quote irony))' \ - --eval '(defalias (quote irony-cdb-autosetup-compile-options) (quote ignore))' \ - --eval "(setq org-latex-pdf-process (quote (\"xelatex -shell-escape -interaction nonstopmode %f\")))" \ - --eval '(setq org-startup-with-latex-preview nil)' \ - --eval '(setq org-startup-indented nil)' \ - --eval '(setq org-export-with-latex t)' \ - --eval '(setq org-confirm-babel-evaluate nil)' \ - --eval '(setq load-prefer-newer t)' \ - --eval '(setq gc-cons-threshold 100000000)' \ - --eval '(setq vc-handled-backends nil)' \ - --eval '(setq make-backup-files nil auto-save-default nil create-lockfiles nil)' \ - --eval '(princ "STEP 1: init.el?\n" (quote external-debugging-output))' \ - -l ${nixmacs}/init.el \ - --eval '(princ "STEP 2: init.el.\n" (quote external-debugging-output))' \ - --eval '(setq org-roam-directory (expand-file-name "mindmap" (expand-file-name "~/monorepo")))' \ - --eval '(setq org-id-track-globally t)' \ - --eval '(org-roam-db-sync)' \ - --eval '(setq term-file-prefix nil)' \ - --eval '(princ "STEP 3: after org roam\n" (quote external-debugging-output))' \ - --eval '(force-mode-line-update)' \ - --eval '(setq org-html-link-use-abs-url nil)' \ - --eval '(setq default-directory (expand-file-name "~/monorepo"))' \ - --eval '(setq org-html-link-use-abs-url nil)' \ - --eval '(setq org-html-link-org-files-as-html t)' \ - --eval '(require (quote htmlize))' \ - --eval '(require (quote nix-mode))' \ - --eval '(setq org-html-htmlize-output-type (quote css))' \ - --eval '(princ "STEP 4: before publish-all\n" (quote external-debugging-output))' \ - --eval '(org-publish-all t)' \ - --eval '(org-publish-all nil)' \ - --eval '(kill-emacs 0)' || (echo "FAIL:" && cat /build/*.log && exit 1) +export NIXMACS_DIR="${nixmacs}" +xvfb-run -a emacs -q -l ${self}/tests/ci-runner.el || { + echo "FAIL: Emacs build crashed." + cat /build/*.log + exit 1 +} + +printf "after emacs\n" CSS_HASH="$(python3 $HOME/monorepo/tests/test-csp-hash.py $HOME/website_html/index.html)" cat < $HOME/website_html/csp_header.conf add_header Content-Security-Policy "default-src 'self'; style-src 'self' 'sha256-$CSS_HASH'; font-src 'self';"; diff --git a/index.org b/index.org index a6df6b9..3f0937f 100644 --- a/index.org +++ b/index.org @@ -5,7 +5,7 @@ #+language: en #+OPTIONS: broken-links:t #+OPTIONS: html-preamble:nil -#+HTML_HEAD: +#+HTML_HEAD_EXTRA: #+attr_html: :width 595 :height 746 #+attr_html: :alt My ret2pop logo diff --git a/journal/.#20251227.org b/journal/.#20251227.org deleted file mode 120000 index 02debe3..0000000 --- a/journal/.#20251227.org +++ /dev/null @@ -1 +0,0 @@ -preston@affinity.2235:1766870603 \ No newline at end of file diff --git a/journal/20230609.org b/journal/20230609.org index dfcfc19..b320a23 100644 --- a/journal/20230609.org +++ b/journal/20230609.org @@ -2,7 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: * Friday, 09 June 2023 ** 23:34 Today, I've decided to try using org-journal to write a journal diff --git a/journal/20230610.org b/journal/20230610.org index 108f9bd..9630800 100644 --- a/journal/20230610.org +++ b/journal/20230610.org @@ -2,7 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: * Saturday, 10 June 2023 ** 15:04 Today, I am with my friends, one of which wants to view my emacs configuration. diff --git a/journal/20230611.org b/journal/20230611.org index 23d1388..ba49997 100644 --- a/journal/20230611.org +++ b/journal/20230611.org @@ -2,7 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: * Sunday, 11 June 2023 ** 09:05 Today, I am going to work more on the website. First of all, diff --git a/journal/20230613.org b/journal/20230613.org index 81e078e..752e786 100644 --- a/journal/20230613.org +++ b/journal/20230613.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 13 June 2023 ** 19:34 diff --git a/journal/20230614.org b/journal/20230614.org index 23edd53..aa8e3d4 100644 --- a/journal/20230614.org +++ b/journal/20230614.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 14 June 2023 ** 09:40 diff --git a/journal/20230615.org b/journal/20230615.org index a8a2600..0a20513 100644 --- a/journal/20230615.org +++ b/journal/20230615.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 15 June 2023 ** 21:53 diff --git a/journal/20230616.org b/journal/20230616.org index afc83df..e51b7d8 100644 --- a/journal/20230616.org +++ b/journal/20230616.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 16 June 2023 ** 13:43 diff --git a/journal/20230619.org b/journal/20230619.org index d004d3c..c732b93 100644 --- a/journal/20230619.org +++ b/journal/20230619.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 19 June 2023 ** 16:48 diff --git a/journal/20230620.org b/journal/20230620.org index 9461dc3..e320e95 100644 --- a/journal/20230620.org +++ b/journal/20230620.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 20 June 2023 ** 02:52 diff --git a/journal/20230621.org b/journal/20230621.org index d8ece6c..f3c9172 100644 --- a/journal/20230621.org +++ b/journal/20230621.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 21 June 2023 ** 21:34 diff --git a/journal/20230622.org b/journal/20230622.org index 6ffc805..10e5912 100644 --- a/journal/20230622.org +++ b/journal/20230622.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 22 June 2023 diff --git a/journal/20230623.org b/journal/20230623.org index d822ff7..b9d77c8 100644 --- a/journal/20230623.org +++ b/journal/20230623.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 23 June 2023 ** 06:16 diff --git a/journal/20230624.org b/journal/20230624.org index 29dfbee..1d8ce9d 100644 --- a/journal/20230624.org +++ b/journal/20230624.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 24 June 2023 ** 14:06 diff --git a/journal/20230625.org b/journal/20230625.org index 2294a66..bc5a70e 100644 --- a/journal/20230625.org +++ b/journal/20230625.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 25 June 2023 ** 13:24 diff --git a/journal/20230704.org b/journal/20230704.org index d9ce56a..544f4e6 100644 --- a/journal/20230704.org +++ b/journal/20230704.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 04 July 2023 ** 12:49 diff --git a/journal/20230711.org b/journal/20230711.org index cfa1ae5..42e190f 100644 --- a/journal/20230711.org +++ b/journal/20230711.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 11 July 2023 ** 16:00 diff --git a/journal/20231208.org b/journal/20231208.org index 3c207bc..c373230 100644 --- a/journal/20231208.org +++ b/journal/20231208.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 08 December 2023 ** 17:31 diff --git a/journal/20231209.org b/journal/20231209.org index 419f2a1..8fb95f3 100644 --- a/journal/20231209.org +++ b/journal/20231209.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 09 December 2023 ** 18:37 diff --git a/journal/20231210.org b/journal/20231210.org index c64278a..fcf88b5 100644 --- a/journal/20231210.org +++ b/journal/20231210.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 10 December 2023 ** 15:21 diff --git a/journal/20231213.org b/journal/20231213.org index 376f61f..534cf0d 100644 --- a/journal/20231213.org +++ b/journal/20231213.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 13 December 2023 ** 14:06 diff --git a/journal/20231214.org b/journal/20231214.org index bfd05b1..e9b6176 100644 --- a/journal/20231214.org +++ b/journal/20231214.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 14 December 2023 ** 13:46 diff --git a/journal/20231215.org b/journal/20231215.org index 9be750e..f1282b0 100644 --- a/journal/20231215.org +++ b/journal/20231215.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 15 December 2023 ** 13:31 diff --git a/journal/20231217.org b/journal/20231217.org index 6a70d9e..deacd60 100644 --- a/journal/20231217.org +++ b/journal/20231217.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 17 December 2023 ** 23:21 diff --git a/journal/20231220.org b/journal/20231220.org index 8605381..50ef853 100644 --- a/journal/20231220.org +++ b/journal/20231220.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 20 December 2023 ** 16:35 diff --git a/journal/20240110.org b/journal/20240110.org index 86465ca..a5e4b47 100644 --- a/journal/20240110.org +++ b/journal/20240110.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 10 January 2024 ** 16:39 diff --git a/journal/20240123.org b/journal/20240123.org index d86dc5b..960fae0 100644 --- a/journal/20240123.org +++ b/journal/20240123.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 23 January 2024 ** 02:13 diff --git a/journal/20240124.org b/journal/20240124.org index d234bd7..0b5ca2c 100644 --- a/journal/20240124.org +++ b/journal/20240124.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 24 January 2024 ** 13:43 diff --git a/journal/20240125.org b/journal/20240125.org index 7b6d88a..5b8becf 100644 --- a/journal/20240125.org +++ b/journal/20240125.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 25 January 2024 ** 12:01 diff --git a/journal/20240126.org b/journal/20240126.org index 71de3d1..77b6f23 100644 --- a/journal/20240126.org +++ b/journal/20240126.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 26 January 2024 ** 16:56 diff --git a/journal/20240127.org b/journal/20240127.org index d3cf67d..bc00cc6 100644 --- a/journal/20240127.org +++ b/journal/20240127.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 27 January 2024 ** 23:27 diff --git a/journal/20240128.org b/journal/20240128.org index 8087d4b..70068d7 100644 --- a/journal/20240128.org +++ b/journal/20240128.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 28 January 2024 ** 22:09 diff --git a/journal/20240205.org b/journal/20240205.org index 46811ea..3419df3 100644 --- a/journal/20240205.org +++ b/journal/20240205.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 05 February 2024 ** 16:39 diff --git a/journal/20240210.org b/journal/20240210.org index c7880e9..9bc55d1 100644 --- a/journal/20240210.org +++ b/journal/20240210.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 10 February 2024 ** 22:09 diff --git a/journal/20240226.org b/journal/20240226.org index 2f218b3..3008e87 100644 --- a/journal/20240226.org +++ b/journal/20240226.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 26 February 2024 ** 18:54 diff --git a/journal/20240228.org b/journal/20240228.org index faa7394..b460e61 100644 --- a/journal/20240228.org +++ b/journal/20240228.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 28 February 2024 ** 21:03 diff --git a/journal/20240229.org b/journal/20240229.org index a4cc59c..73a7183 100644 --- a/journal/20240229.org +++ b/journal/20240229.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 29 February 2024 ** 15:24 diff --git a/journal/20240301.org b/journal/20240301.org index 78169f7..ef2e953 100644 --- a/journal/20240301.org +++ b/journal/20240301.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 01 March 2024 ** 16:44 diff --git a/journal/20240306.org b/journal/20240306.org index fd866d0..f6bf426 100644 --- a/journal/20240306.org +++ b/journal/20240306.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 06 March 2024 ** 16:18 diff --git a/journal/20240309.org b/journal/20240309.org index 2ce4f32..7e1222e 100644 --- a/journal/20240309.org +++ b/journal/20240309.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 09 March 2024 ** 19:04 diff --git a/journal/20240310.org b/journal/20240310.org index 3f38f95..7ee29b2 100644 --- a/journal/20240310.org +++ b/journal/20240310.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 10 March 2024 ** 23:02 diff --git a/journal/20240311.org b/journal/20240311.org index da949a1..38753b8 100644 --- a/journal/20240311.org +++ b/journal/20240311.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 11 March 2024 ** 22:30 diff --git a/journal/20240312.org b/journal/20240312.org index b061ced..f69056c 100644 --- a/journal/20240312.org +++ b/journal/20240312.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 12 March 2024 ** 11:58 diff --git a/journal/20240313.org b/journal/20240313.org index fc14975..b395279 100644 --- a/journal/20240313.org +++ b/journal/20240313.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 13 March 2024 ** 17:38 diff --git a/journal/20240314.org b/journal/20240314.org index 3356a44..64d6005 100644 --- a/journal/20240314.org +++ b/journal/20240314.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 14 March 2024 ** 15:13 diff --git a/journal/20240315.org b/journal/20240315.org index 0c4d8d1..1c7dce3 100644 --- a/journal/20240315.org +++ b/journal/20240315.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 15 March 2024 ** 16:56 diff --git a/journal/20240316.org b/journal/20240316.org index 1fbc70e..5ba4e7c 100644 --- a/journal/20240316.org +++ b/journal/20240316.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 16 March 2024 ** 18:27 diff --git a/journal/20240317.org b/journal/20240317.org index 0424275..2062123 100644 --- a/journal/20240317.org +++ b/journal/20240317.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 17 March 2024 ** 14:07 diff --git a/journal/20240318.org b/journal/20240318.org index 01da2e4..aa54597 100644 --- a/journal/20240318.org +++ b/journal/20240318.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 18 March 2024 ** 00:14 diff --git a/journal/20240319.org b/journal/20240319.org index 8d7b3fe..ba9f739 100644 --- a/journal/20240319.org +++ b/journal/20240319.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 19 March 2024 ** 17:02 diff --git a/journal/20240321.org b/journal/20240321.org index fe2809a..77ae973 100644 --- a/journal/20240321.org +++ b/journal/20240321.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 21 March 2024 ** 14:22 diff --git a/journal/20240323.org b/journal/20240323.org index fd03eb0..44206cf 100644 --- a/journal/20240323.org +++ b/journal/20240323.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 23 March 2024 ** 17:47 diff --git a/journal/20240324.org b/journal/20240324.org index 51ab170..a760224 100644 --- a/journal/20240324.org +++ b/journal/20240324.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 24 March 2024 ** 16:11 diff --git a/journal/20240329.org b/journal/20240329.org index 6633945..633b959 100644 --- a/journal/20240329.org +++ b/journal/20240329.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 29 March 2024 ** 16:52 diff --git a/journal/20240330.org b/journal/20240330.org index 4ed2db1..687f84f 100644 --- a/journal/20240330.org +++ b/journal/20240330.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 30 March 2024 ** 12:48 diff --git a/journal/20240404.org b/journal/20240404.org index f24095e..e2cac6c 100644 --- a/journal/20240404.org +++ b/journal/20240404.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 04 April 2024 ** 21:33 diff --git a/journal/20240416.org b/journal/20240416.org index 2d75e29..b6be96e 100644 --- a/journal/20240416.org +++ b/journal/20240416.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 16 April 2024 ** 10:38 diff --git a/journal/20240502.org b/journal/20240502.org index 9f1f060..cd7006e 100644 --- a/journal/20240502.org +++ b/journal/20240502.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 02 May 2024 ** 23:28 diff --git a/journal/20240503.org b/journal/20240503.org index 514afa0..0390425 100644 --- a/journal/20240503.org +++ b/journal/20240503.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 03 May 2024 ** 18:34 diff --git a/journal/20240510.org b/journal/20240510.org index ade88a2..bbcf694 100644 --- a/journal/20240510.org +++ b/journal/20240510.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 10 May 2024 ** 16:04 diff --git a/journal/20240512.org b/journal/20240512.org index a23ad18..bb70cd8 100644 --- a/journal/20240512.org +++ b/journal/20240512.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 12 May 2024 ** 12:46 diff --git a/journal/20240519.org b/journal/20240519.org index c8f8fa3..2fd0073 100644 --- a/journal/20240519.org +++ b/journal/20240519.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 19 May 2024 ** 20:07 diff --git a/journal/20240524.org b/journal/20240524.org index 14608fd..8dafc2d 100644 --- a/journal/20240524.org +++ b/journal/20240524.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 24 May 2024 ** 14:07 diff --git a/journal/20240530.org b/journal/20240530.org index cf5e2da..0a7e277 100644 --- a/journal/20240530.org +++ b/journal/20240530.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 30 May 2024 ** 00:49 diff --git a/journal/20240531.org b/journal/20240531.org index 6cad1aa..216e4e1 100644 --- a/journal/20240531.org +++ b/journal/20240531.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 31 May 2024 ** 03:42 diff --git a/journal/20240601.org b/journal/20240601.org index 5321a40..8a89edc 100644 --- a/journal/20240601.org +++ b/journal/20240601.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 01 June 2024 ** 11:23 diff --git a/journal/20240602.org b/journal/20240602.org index 49f748f..0f10c4a 100644 --- a/journal/20240602.org +++ b/journal/20240602.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 02 June 2024 ** 12:35 diff --git a/journal/20240605.org b/journal/20240605.org index b6dcdd5..583140f 100644 --- a/journal/20240605.org +++ b/journal/20240605.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 05 June 2024 ** 11:23 diff --git a/journal/20240610.org b/journal/20240610.org index ad2bd70..7f11b98 100644 --- a/journal/20240610.org +++ b/journal/20240610.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 10 June 2024 ** 18:44 diff --git a/journal/20240924.org b/journal/20240924.org index b7acdf6..db55b50 100644 --- a/journal/20240924.org +++ b/journal/20240924.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 24 September 2024 ** 00:14 diff --git a/journal/20241230.org b/journal/20241230.org index 517c519..12a0e44 100644 --- a/journal/20241230.org +++ b/journal/20241230.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 30 December 2024 ** 19:41 diff --git a/journal/20250102.org b/journal/20250102.org index 1cbccb9..28277e9 100644 --- a/journal/20250102.org +++ b/journal/20250102.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 02 January 2025 Ainslie is coming to my house today, and winter break is almost over. I'm currently trying to do diff --git a/journal/20250103.org b/journal/20250103.org index 338ad7c..29fc517 100644 --- a/journal/20250103.org +++ b/journal/20250103.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 03 January 2025 ** 15:52 diff --git a/journal/20250106.org b/journal/20250106.org index c6be666..4f220d1 100644 --- a/journal/20250106.org +++ b/journal/20250106.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 06 January 2025 ** 20:54 diff --git a/journal/20250108.org b/journal/20250108.org index 4239671..836baf1 100644 --- a/journal/20250108.org +++ b/journal/20250108.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 08 January 2025 ** 12:30 diff --git a/journal/20250111.org b/journal/20250111.org index c50aeb9..d4f4a1a 100644 --- a/journal/20250111.org +++ b/journal/20250111.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 11 January 2025 ** 02:21 diff --git a/journal/20250112.org b/journal/20250112.org index 8ea1936..5c73783 100644 --- a/journal/20250112.org +++ b/journal/20250112.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 12 January 2025 ** 21:36 diff --git a/journal/20250116.org b/journal/20250116.org index e602920..c65ed62 100644 --- a/journal/20250116.org +++ b/journal/20250116.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 16 January 2025 ** 19:18 diff --git a/journal/20250119.org b/journal/20250119.org index 7f04926..2702924 100644 --- a/journal/20250119.org +++ b/journal/20250119.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 19 January 2025 ** 11:49 diff --git a/journal/20250123.org b/journal/20250123.org index 002a61d..8ab2370 100644 --- a/journal/20250123.org +++ b/journal/20250123.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 23 January 2025 ** 17:09 diff --git a/journal/20250201.org b/journal/20250201.org index fbf1975..7c4f4ca 100644 --- a/journal/20250201.org +++ b/journal/20250201.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 01 February 2025 ** 19:30 diff --git a/journal/20250203.org b/journal/20250203.org index 81d1177..7d6d93a 100644 --- a/journal/20250203.org +++ b/journal/20250203.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 03 February 2025 ** 03:00 diff --git a/journal/20250211.org b/journal/20250211.org index 481fc5d..2b7a662 100644 --- a/journal/20250211.org +++ b/journal/20250211.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 11 February 2025 ** 04:00 diff --git a/journal/20250214.org b/journal/20250214.org index 269cd16..26ef1c1 100644 --- a/journal/20250214.org +++ b/journal/20250214.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 14 February 2025 ** 20:12 diff --git a/journal/20250218.org b/journal/20250218.org index 738607e..dc9983e 100644 --- a/journal/20250218.org +++ b/journal/20250218.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 18 February 2025 ** 01:21 diff --git a/journal/20250220.org b/journal/20250220.org index c2b9cf3..9aa7755 100644 --- a/journal/20250220.org +++ b/journal/20250220.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 20 February 2025 ** 22:06 diff --git a/journal/20250222.org b/journal/20250222.org index 77cc8b5..4f1793a 100644 --- a/journal/20250222.org +++ b/journal/20250222.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 22 February 2025 ** 02:39 diff --git a/journal/20250302.org b/journal/20250302.org index aa21e68..b2d367c 100644 --- a/journal/20250302.org +++ b/journal/20250302.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 02 March 2025 ** 03:51 diff --git a/journal/20250305.org b/journal/20250305.org index 646fec2..345dab4 100644 --- a/journal/20250305.org +++ b/journal/20250305.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 05 March 2025 ** 03:42 diff --git a/journal/20250308.org b/journal/20250308.org index 91dfdca..b2e9eb8 100644 --- a/journal/20250308.org +++ b/journal/20250308.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Saturday, 08 March 2025 ** 01:27 diff --git a/journal/20250310.org b/journal/20250310.org index 15e0901..180064c 100644 --- a/journal/20250310.org +++ b/journal/20250310.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 10 March 2025 ** 01:08 diff --git a/journal/20250311.org b/journal/20250311.org index 9c2a7d3..9bb031f 100644 --- a/journal/20250311.org +++ b/journal/20250311.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 11 March 2025 ** 00:34 diff --git a/journal/20250313.org b/journal/20250313.org index daf654e..64d62c2 100644 --- a/journal/20250313.org +++ b/journal/20250313.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 13 March 2025 ** 09:52 diff --git a/journal/20250317.org b/journal/20250317.org index b26249b..0491b80 100644 --- a/journal/20250317.org +++ b/journal/20250317.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 17 March 2025 ** 01:43 diff --git a/journal/20250321.org b/journal/20250321.org index c280b26..958c729 100644 --- a/journal/20250321.org +++ b/journal/20250321.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 21 March 2025 ** 04:27 diff --git a/journal/20250602.org b/journal/20250602.org index 4f7114d..4d70a8b 100644 --- a/journal/20250602.org +++ b/journal/20250602.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 02 June 2025 ** 20:37 diff --git a/journal/20250626.org b/journal/20250626.org index 5302955..b7d27f3 100644 --- a/journal/20250626.org +++ b/journal/20250626.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 26 June 2025 ** 23:16 diff --git a/journal/20250703.org b/journal/20250703.org index fce34c7..f7d455b 100644 --- a/journal/20250703.org +++ b/journal/20250703.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 03 July 2025 ** 20:05 diff --git a/journal/20250720.org b/journal/20250720.org index 5315dda..5c0c22a 100644 --- a/journal/20250720.org +++ b/journal/20250720.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 20 July 2025 ** 21:21 diff --git a/journal/20250723.org b/journal/20250723.org index 7b00356..578f70c 100644 --- a/journal/20250723.org +++ b/journal/20250723.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 23 July 2025 ** 23:15 diff --git a/journal/20250826.org b/journal/20250826.org index 3347956..4878180 100644 --- a/journal/20250826.org +++ b/journal/20250826.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 26 August 2025 ** 03:10 diff --git a/journal/20250908.org b/journal/20250908.org index 3ed11d7..f6b8bca 100644 --- a/journal/20250908.org +++ b/journal/20250908.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 08 September 2025 ** 04:34 diff --git a/journal/20250909.org b/journal/20250909.org index 17c2f68..eb087cd 100644 --- a/journal/20250909.org +++ b/journal/20250909.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 09 September 2025 ** 02:39 diff --git a/journal/20250912.org b/journal/20250912.org index 60eeaaa..46e289f 100644 --- a/journal/20250912.org +++ b/journal/20250912.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Friday, 12 September 2025 ** 23:46 diff --git a/journal/20250914.org b/journal/20250914.org index 893d33e..8815db9 100644 --- a/journal/20250914.org +++ b/journal/20250914.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 14 September 2025 ** 02:17 diff --git a/journal/20250915.org b/journal/20250915.org index 57e2dfe..09a72bc 100644 --- a/journal/20250915.org +++ b/journal/20250915.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Monday, 15 September 2025 ** 01:19 diff --git a/journal/20250916.org b/journal/20250916.org index 62afc7e..5c6ff8b 100644 --- a/journal/20250916.org +++ b/journal/20250916.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Tuesday, 16 September 2025 ** 03:13 diff --git a/journal/20250917.org b/journal/20250917.org index 8833c07..353e394 100644 --- a/journal/20250917.org +++ b/journal/20250917.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 17 September 2025 ** 03:39 diff --git a/journal/20250924.org b/journal/20250924.org index 275a06d..86aec8a 100644 --- a/journal/20250924.org +++ b/journal/20250924.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Wednesday, 24 September 2025 ** 07:08 diff --git a/journal/20250928.org b/journal/20250928.org index eb8dd4f..1ba3781 100644 --- a/journal/20250928.org +++ b/journal/20250928.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Sunday, 28 September 2025 ** 20:51 diff --git a/journal/20260129.org b/journal/20260129.org index 9166414..c5ee0a1 100644 --- a/journal/20260129.org +++ b/journal/20260129.org @@ -2,9 +2,6 @@ #+STARTUP: showeverything #+DESCRIPTION: My daily journal entry #+AUTHOR: Preston Pan -#+HTML_HEAD: -#+html_head: -#+html_head: #+options: broken-links:t * Thursday, 29 January 2026 ** 16:34 diff --git a/journal/20260314.org b/journal/20260314.org new file mode 100644 index 0000000..c10aee1 --- /dev/null +++ b/journal/20260314.org @@ -0,0 +1,14 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+date: +#+options: broken-links:t +* Saturday, 14 March 2026 +** 02:12 +I've started journaling again because I just realized that this feature existed. Honestly, it's pretty +cool that this even exists. Not just the journaling feature (which I didn't make obviously but it's cool) +but also my website and my entire CI pipeline that builds it. I'm pretty proud of myself for doing all that. + +For reference, for the past week or so I've been in the coal mines, writing nix and a bit of emacs-lisp code +in order to build my website and do a whole bunch of other things. diff --git a/journal/index.org b/journal/index.org index 1e17d37..dde02a2 100644 --- a/journal/index.org +++ b/journal/index.org @@ -5,13 +5,6 @@ #+date: <2023-06-09 Fri> #+language: en #+OPTIONS: broken-links:t -#+html_head: -#+html_head: -#+html_head: -#+html_head: -#+html_head: -#+html_head: -#+html_head: * Introduction This is my journal. It's basically my everyday life, or at least the part that I can make public (not many personal details although there will be some). I will also be posting some TODOs that diff --git a/nix b/nix index 64773f0..71a46de 160000 --- a/nix +++ b/nix @@ -1 +1 @@ -Subproject commit 64773f043d24d75e8d070393c965f457135c3494 +Subproject commit 71a46de1309a6c496ecab5ca84a1a4ba6d0f6754 diff --git a/tests/ci-build-stage-two.el b/tests/ci-build-stage-two.el new file mode 100644 index 0000000..3ab5c91 --- /dev/null +++ b/tests/ci-build-stage-two.el @@ -0,0 +1,47 @@ +(princ "STEP 2: init.el.\n" (quote external-debugging-output)) + +(setq org-id-track-globally t) + +(princ "STEP 3: after org roam\n" (quote external-debugging-output)) + +(setq term-file-prefix nil) + +(princ "STEP 4: after org roam\n" (quote external-debugging-output)) + +(force-mode-line-update) + +(setq org-html-link-use-abs-url nil) +(setq default-directory (expand-file-name "~/monorepo")) +(setq org-html-link-use-abs-url nil) +(setq org-html-link-org-files-as-html t) + +(require (quote htmlize)) +(require (quote nix-mode)) + +(setq org-html-htmlize-output-type (quote css)) + +(princ "STEP 5: before catppuccin\n" (quote external-debugging-output)) + +(require 'catppuccin-theme) +(setq catppuccin-flavor 'mocha) +(load-theme 'catppuccin t) + +(defun my-ci-force-fontification () + "Ensure the buffer is fully colorized before htmlize touches it." + (font-lock-ensure) + (font-lock-flush) + (font-lock-ensure)) + +(add-hook 'org-publish-before-export-hook #'my-ci-force-fontification) + +(face-spec-recalc 'default (selected-frame)) +(when (fboundp 'redisplay) (redisplay t)) + +(princ (format "THEME CHECK - Default background: %s\n" + (face-attribute 'default :background)) + 'external-debugging-output) + +(princ "STEP 6: before publish-all\n" (quote external-debugging-output)) + +(org-publish-all t) +(org-publish-all nil) diff --git a/tests/ci-build.el b/tests/ci-build.el new file mode 100644 index 0000000..f72eb02 --- /dev/null +++ b/tests/ci-build.el @@ -0,0 +1,43 @@ +(setq inhibit-startup-screen t) +(setq inhibit-startup-message t) +(setq enable-local-variables :all) + +(defalias (quote yes-or-no-p) (lambda (&rest args) t)) +(defalias (quote y-or-n-p) (lambda (&rest args) t)) + +(setq message-log-max t) +(setq standard-output (quote external-debugging-output)) + +(princ "STEP 0: tf\n" (quote external-debugging-output)) + +(setq noninteractive t) +(setq system-email "lol@troll.com") +(setq system-username "ci-runner") +(setq system-fullname "Preston Pan") +(setq system-gpgkey "00000000") +(defun package-vc-install (&rest args) (message "blocked package-vc-install for %s" args)) +(defun package-vc--unpack (&rest args) nil) +(setq package-archives nil) +(setq use-package-always-ensure nil) +(setq package-vc-selected-packages nil) + +(defalias (quote scroll-bar-mode) (quote ignore)) +(defalias (quote tool-bar-mode) (quote ignore)) +(defalias (quote menu-bar-mode) (quote ignore)) + +(provide (quote lean4-mode)) +(provide (quote irony-mode)) +(provide (quote irony)) +(defalias (quote irony-cdb-autosetup-compile-options) (quote ignore)) + +(setq org-latex-pdf-process '("xelatex -shell-escape -interaction nonstopmode %f")) +(setq org-startup-with-latex-preview nil) +(setq org-startup-indented nil) +(setq org-export-with-latex t) +(setq org-confirm-babel-evaluate nil) +(setq load-prefer-newer t) +(setq gc-cons-threshold 100000000) +(setq vc-handled-backends nil) +(setq make-backup-files nil auto-save-default nil create-lockfiles nil) + +(princ "STEP 1: init.el?\n" (quote external-debugging-output)) diff --git a/tests/ci-runner.el b/tests/ci-runner.el new file mode 100644 index 0000000..5b3397f --- /dev/null +++ b/tests/ci-runner.el @@ -0,0 +1,9 @@ +(condition-case err + (progn + (load-file (expand-file-name "tests/ci-build.el" default-directory)) + (load-file (expand-file-name "init.el" (getenv "NIXMACS_DIR"))) + (load-file (expand-file-name "tests/ci-build-stage-two.el" default-directory)) + (kill-emacs 0)) + (error + (princ (format "\nFATAL CI ERROR: %s\n" (error-message-string err)) 'external-debugging-output) + (kill-emacs 1))) -- cgit v1.3 From 48e818808429e98e7db1f78b3e10537d829d2861 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sun, 15 Mar 2026 18:45:32 -0700 Subject: fix build process to use catppuccin theme; checkpoint --- config/emacs.org | 391 +++++++++++++++++++++++--------------------- config/nix.org | 26 ++- mindmap/LRC circuit.org | 32 ++-- nix | 2 +- tests/ci-build-stage-two.el | 4 - tests/ci-build.el | 8 +- 6 files changed, 252 insertions(+), 211 deletions(-) (limited to 'config/emacs.org') diff --git a/config/emacs.org b/config/emacs.org index 9de6f61..dda7dc2 100644 --- a/config/emacs.org +++ b/config/emacs.org @@ -143,53 +143,53 @@ configuration as they are also defined using the use-package macros. Some of the have documentation strings attached, so it is easy to follow what the individual options do. Emacs is self documenting, after all! #+begin_src emacs-lisp :tangle ../nix/init.el -(use-package emacs - :custom - ;; global defaults - (indent-tabs-mode nil "no real tabs, only spaces") - (tab-width 2 "tab show as 2 spaces") - (standard-indent 2 "base indentation") - (custom-safe-themes t "I already manage my themes with nix") - (custom-file null-device "Don't save custom configs") - - ;; Startup errors - (warning-minimum-level :emergency "Supress emacs warnings") - (confirm-kill-processes nil "Don't ask to quit") - (debug-ignored-errors (cons 'remote-file-error debug-ignored-errors) "Remove annoying error from debug errors") - (browse-url-generic-program "librewolf" "set browser to librewolf") - (browse-url-secondary-browser-function 'browse-url-generic "set browser") - (browse-url-browser-function 'browse-url-generic "set browser") - (default-frame-alist '((alpha-background . 70) - (vertical-scroll-bars) - (internal-border-width . 24) - (left-fringe . 8) - (right-fringe . 8))) - - ;; Mouse wheel - (mouse-wheel-scroll-amount '(1 ((shift) . 1)) "Nicer scrolling") - (mouse-wheel-progressive-speed nil "Make scrolling non laggy") - (mouse-wheel-follow-mouse 't "Scroll correct window") - (scroll-conservatively 101 "Sort of smooth scrolling") - (scroll-step 1 "Scroll one line at a time") - (debug-on-error nil "Don't make the annoying popups") - (display-time-24hr-format t "Use 24 hour format to read the time") - (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") - (use-short-answers t "Use y instead of yes") - (make-backup-files nil "Don't make backups") - (display-fill-column-indicator-column 150 "Draw a line at 100 characters") - (fill-column 150) - (line-spacing 2 "Default line spacing") - (c-doc-comment-style '((c-mode . doxygen) - (c++-mode . doxygen))) - - - :hook ((text-mode . visual-line-mode) - (prog-mode . display-line-numbers-mode) - (prog-mode . display-fill-column-indicator-mode) - (org-mode . auto-fill-mode) - (org-mode . display-fill-column-indicator-mode) - (org-mode . display-line-numbers-mode)) - :config (emacs-config)) + (use-package emacs + :custom + ;; global defaults + (indent-tabs-mode nil "no real tabs, only spaces") + (tab-width 2 "tab show as 2 spaces") + (standard-indent 2 "base indentation") + (custom-safe-themes t "I already manage my themes with nix") + (custom-file null-device "Don't save custom configs") + + ;; Startup errors + (warning-minimum-level :emergency "Supress emacs warnings") + (confirm-kill-processes nil "Don't ask to quit") + (debug-ignored-errors (cons 'remote-file-error debug-ignored-errors) "Remove annoying error from debug errors") + (browse-url-generic-program "librewolf" "set browser to librewolf") + (browse-url-secondary-browser-function 'browse-url-generic "set browser") + (browse-url-browser-function 'browse-url-generic "set browser") + (default-frame-alist '((alpha-background . 70) + (vertical-scroll-bars) + (internal-border-width . 24) + (left-fringe . 8) + (right-fringe . 8))) + + ;; Mouse wheel + (mouse-wheel-scroll-amount '(1 ((shift) . 1)) "Nicer scrolling") + (mouse-wheel-progressive-speed nil "Make scrolling non laggy") + (mouse-wheel-follow-mouse 't "Scroll correct window") + (scroll-conservatively 101 "Sort of smooth scrolling") + (scroll-step 1 "Scroll one line at a time") + (debug-on-error nil "Don't make the annoying popups") + (display-time-24hr-format t "Use 24 hour format to read the time") + (display-line-numbers-type 'relative "Relative line numbers for easy vim jumping") + (use-short-answers t "Use y instead of yes") + (make-backup-files nil "Don't make backups") + (display-fill-column-indicator-column 150 "Draw a line at 100 characters") + (fill-column 150) + (line-spacing 2 "Default line spacing") + (c-doc-comment-style '((c-mode . doxygen) + (c++-mode . doxygen))) + + + :hook ((text-mode . visual-line-mode) + (prog-mode . display-line-numbers-mode) + (prog-mode . display-fill-column-indicator-mode) + (org-mode . auto-fill-mode) + (org-mode . display-fill-column-indicator-mode) + (org-mode . display-line-numbers-mode)) + :config (emacs-config)) #+end_src As you can see, the config (and sometimes the init section) of most of these use-package blocks contain most of the imperative commands. In fact, most of the configurations are completely @@ -204,148 +204,168 @@ of course Emacs was not designed to be fully imperative. ** Org Mode This is my org mode configuration, which also configures latex. #+begin_src emacs-lisp :tangle ../nix/init.el -(use-package org - :demand t - :after (f s dash nix-mode) - :hook - ((org-mode-hook . remove-annoying-pairing)) - :custom - ;; Fix terrible indentation issues - (org-edit-src-content-indentation 0) - (org-src-tab-acts-natively t) - (org-src-preserve-indentation t) - - (TeX-PDF-mode t) - (org-confirm-babel-evaluate nil "Don't ask to evaluate code block") - (org-export-with-broken-links t "publish website even with broken links") - (org-src-fontify-natively t "Colors!") - - ;; org-latex - (org-preview-latex-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") - (org-latex-preview-ltxpng-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") - (org-latex-to-html-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^

//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") - (org-latex-to-mathml-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^

//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") - - (TeX-engine 'xetex "set xelatex as default engine") - (preview-default-option-list '("displaymath" "textmath" "graphics") "preview latex") - (preview-image-type 'png "Use PNGs") - (org-format-latex-options - '(:foreground default - :background default - :scale 2 - :html-foreground "Black" - :html-background "Transparent" - :html-scale 1.5 - :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) "space latex better") - (org-return-follows-link t "be able to follow links without mouse") - (org-startup-indented t "Indent the headings") - (org-image-actual-width '(300) "Cap width") - (org-startup-with-latex-preview t "see latex previews on opening file") - (org-startup-with-inline-images t "See images on opening file") - (org-hide-emphasis-markers t "prettify org mode") - (org-use-sub-superscripts "{}" "Only display superscripts and subscripts when enclosed in {}") - (org-pretty-entities t "prettify org mode") - (org-agenda-files (list "~/monorepo/agenda.org" "~/org/notes.org" "~/org/agenda.org") "set default org files") - (org-default-notes-file (concat org-directory "/notes.org") "Notes file") - - ;; ricing - (org-auto-align-tags nil) - (org-tags-column 0) - (org-catch-invisible-edits 'show-and-error) - (org-special-ctrl-a/e t) - (org-insert-heading-respect-content t) - (org-hide-emphasis-markers t) - (org-pretty-entities t) - (org-agenda-tags-column 0) - (org-ellipsis "…") - :config - (org-babel-do-load-languages 'org-babel-load-languages - '((shell . t) - (python . t) - (nix . t) - (latex . t)))) - -(use-package org-tempo - :after org) - -(use-package org-habit - :after org - :custom - (org-habit-preceding-days 7 "See org habit entries") - (org-habit-following-days 35 "See org habit entries") - (org-habit-show-habits t "See org habit entries") - (org-habit-show-habits-only-for-today nil "See org habit entries") - (org-habit-show-all-today t "Show org habit graph")) + (use-package org + :demand t + :after (f s dash nix-mode) + :hook + ((org-mode . remove-annoying-pairing)) + :custom + ;; Fix terrible indentation issues + (org-edit-src-content-indentation 0) + (org-src-tab-acts-natively t) + (org-src-preserve-indentation t) + + (TeX-PDF-mode t) + (org-confirm-babel-evaluate nil "Don't ask to evaluate code block") + (org-export-with-broken-links t "publish website even with broken links") + (org-src-fontify-natively t "Colors!") + + ;; org-latex + (org-format-latex-header "\\documentclass{article} \ + \\usepackage[usenames]{color} \ + [DEFAULT-PACKAGES] \ + [PACKAGES] \ + \\pagestyle{empty} % do not remove \ + % The settings below are copied from fullpage.sty \ + \\setlength{\\textwidth}{\\paperwidth} \ + \\addtolength{\\textwidth}{-3cm} \ + \\setlength{\\oddsidemargin}{1.5cm} \ + \\addtolength{\\oddsidemargin}{-2.54cm} \ + \\setlength{\\evensidemargin}{\\oddsidemargin} \ + \\setlength{\\textheight}{\\paperheight} \ + \\addtolength{\\textheight}{-\\headheight} \ + \\addtolength{\\textheight}{-\\headsep} \ + \\addtolength{\\textheight}{-\\footskip} \ + \\addtolength{\\textheight}{-3cm} \ + \\setlength{\\topmargin}{1.5cm} \ + \\addtolength{\\topmargin}{-2.54cm} \ + \\usepackage{amsmath} \ + ") + (org-preview-latex-image-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") + (org-latex-preview-ltxpng-directory (expand-file-name "~/.cache/ltximg/") "don't use weird cache location") + (org-latex-to-html-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^

//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") + (org-latex-to-mathml-convert-command "printf '%%s' %i | pandoc -f latex -t html --mathml | tr -d '\\n' | sed -e 's/^

//' -e 's/<\\/p>$//'" "latex to MathML with special character handling") + + (TeX-engine 'xetex "set xelatex as default engine") + (preview-default-option-list '("displaymath" "textmath" "graphics") "preview latex") + ;; (preview-image-type 'png "Use PNGs") + (org-preview-latex-default-process 'dvipng) + (org-format-latex-options + '(:foreground default + :background default + :scale 2 + :html-foreground "Black" + :html-background "Transparent" + :html-scale 1.5 + :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")) "space latex better") + (org-return-follows-link t "be able to follow links without mouse") + (org-startup-indented t "Indent the headings") + (org-image-actual-width '(300) "Cap width") + (org-startup-with-latex-preview t "see latex previews on opening file") + (org-startup-with-inline-images t "See images on opening file") + (org-hide-emphasis-markers t "prettify org mode") + (org-use-sub-superscripts "{}" "Only display superscripts and subscripts when enclosed in {}") + (org-pretty-entities t "prettify org mode") + (org-agenda-files (list "~/monorepo/agenda.org" "~/org/notes.org" "~/org/agenda.org") "set default org files") + (org-default-notes-file (concat org-directory "/notes.org") "Notes file") + + ;; ricing + (org-auto-align-tags nil) + (org-tags-column 0) + (org-catch-invisible-edits 'show-and-error) + (org-special-ctrl-a/e t) + (org-insert-heading-respect-content t) + (org-hide-emphasis-markers t) + (org-pretty-entities t) + (org-agenda-tags-column 0) + (org-ellipsis "…") + :config + (org-babel-do-load-languages 'org-babel-load-languages + '((shell . t) + (python . t) + (nix . t) + (latex . t)))) + + (use-package org-tempo + :after org) + + (use-package org-habit + :after org + :custom + (org-habit-preceding-days 7 "See org habit entries") + (org-habit-following-days 35 "See org habit entries") + (org-habit-show-habits t "See org habit entries") + (org-habit-show-habits-only-for-today nil "See org habit entries") + (org-habit-show-all-today t "Show org habit graph")) -(when noninteractive (use-package htmlize :demand t - :after (catppuccin-theme))) + :after (catppuccin-theme doom-themes)) -(unless noninteractive - (use-package htmlize - :after (doom-themes))) + (unless noninteractive + (use-package htmlize + :after (doom-themes))) -(use-package ox-latex - :after (org) - :custom - (org-latex-compiler "xelatex" "Use latex as default") - (org-latex-pdf-process '("xelatex -interaction=nonstopmode -output-directory=%o %f") "set xelatex as default")) + (use-package ox-latex + :after (org) + :custom + (org-latex-compiler "xelatex" "Use latex as default") + (org-latex-pdf-process '("xelatex -interaction=nonstopmode -output-directory=%o %f") "set xelatex as default")) -(use-package ox-html - :demand t - :after (org htmlize) - :custom - (org-html-htmlize-output-type 'css "allow styling from CSS file") - (org-html-with-latex 'html "let my html handler handle latex") - (org-html-mathjax-options nil "disable mathjax, use MathML") - (org-html-mathjax-template "" "disable mathjax, use MathML") - (org-html-head-include-default-style nil "use my own css for everything") - (org-html-head-include-scripts nil "use my own js for everything") - (org-html-postamble (concat "Copyright © 2024 " system-fullname) "set copyright notice on bottom of site") - (org-html-divs '((preamble "header" "preamble") - (content "main" "content") - (postamble "footer" "postamble")) "semantic html exports") - (org-html-viewport '((width "device-width") - (initial-scale "1.0") - (minimum-scale "1.0")) "Prevent zooming out past default size") - :config (advice-add 'org-html-latex-environment :around #'org-html-latex-environment-pandoc-fix)) - -(use-package ox-publish - :demand t - :after (org f s dash ox-html) - :custom - (org-publish-project-alist - `(("website-org" - :base-directory "~/monorepo" - :base-extension "org" - :exclude "nix/README\\.org" - :publishing-directory "~/website_html" - :with-author t - :with-date t - :recursive t - :publishing-function org-html-publish-to-html - :headline-levels 4 - :html-head ,(concat "\n\n\n\n\n\n\n\n\n\n\n" - "" "") - (s-replace "\n" "") - (s-replace "/*]]>*/-->" "") - (s-trim) - (minify-css)) - (f-read-text "~/monorepo/style.css" 'utf-8) - "") - :html-preamble t - :html-preamble-format (("en" "

home | section main page


"))) - ("website-static" - :base-directory "~/monorepo" - :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt\\|webp\\|conf" - :publishing-directory "~/website_html/" - :recursive t - :publishing-function org-publish-attachment) - ("website" :auto-sitemap t :components ("website-org" "website-static"))) "functions to publish website")) + (use-package ox-html + :demand t + :after (org htmlize) + :custom + (org-html-htmlize-output-type 'css "allow styling from CSS file") + (org-html-with-latex 'html "let my html handler handle latex") + (org-html-mathjax-options nil "disable mathjax, use MathML") + (org-html-mathjax-template "" "disable mathjax, use MathML") + (org-html-head-include-default-style nil "use my own css for everything") + (org-html-head-include-scripts nil "use my own js for everything") + (org-html-postamble (concat "Copyright © 2024 " system-fullname) "set copyright notice on bottom of site") + (org-html-divs '((preamble "header" "preamble") + (content "main" "content") + (postamble "footer" "postamble")) "semantic html exports") + (org-html-viewport '((width "device-width") + (initial-scale "1.0") + (minimum-scale "1.0")) "Prevent zooming out past default size") + :config (advice-add 'org-html-latex-environment :around #'org-html-latex-environment-pandoc-fix)) + + (use-package ox-publish + :demand t + :after (org f s dash ox-html) + :custom + (org-publish-project-alist + `(("website-org" + :base-directory "~/monorepo" + :base-extension "org" + :exclude "nix/README\\.org" + :publishing-directory "~/website_html" + :with-author t + :with-date t + :recursive t + :publishing-function org-html-publish-to-html + :headline-levels 4 + :html-head ,(concat "\n\n\n\n\n\n\n\n\n\n\n" + "" "") + (s-replace "\n" "") + (s-replace "/*]]>*/-->" "") + (s-trim) + (minify-css)) + (f-read-text "~/monorepo/style.css" 'utf-8) + "") + :html-preamble t + :html-preamble-format (("en" "

home | section main page


"))) + ("website-static" + :base-directory "~/monorepo" + :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico\\|asc\\|pub\\|webmanifest\\|xml\\|svg\\|txt\\|webp\\|conf" + :publishing-directory "~/website_html/" + :recursive t + :publishing-function org-publish-attachment) + ("website" :auto-sitemap t :components ("website-org" "website-static"))) "functions to publish website")) #+end_src As you can see, I only have one real entry in config here (I don't count requires even though they have to be on the top) @@ -869,8 +889,9 @@ to Chromium if I have to: ** Nix Mode Load Nix mode so our exported website has syntax highlighting for Nix blocks. #+begin_src emacs-lisp :tangle ../nix/init.el -(use-package nix-mode - :mode "\\.nix\\'") + (use-package nix-mode + :demand t + :mode "\\.nix\\'") #+end_src ** Org Roam For all my mathematics and programming notes: diff --git a/config/nix.org b/config/nix.org index 6eb55d5..3a8350b 100644 --- a/config/nix.org +++ b/config/nix.org @@ -3514,16 +3514,29 @@ Make sure those are set correctly. I've set it to sign by default. programs.git = { enable = lib.mkDefault config.monorepo.profiles.graphics.enable; package = pkgs.gitFull; - lfs.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; userName = super.monorepo.vars.fullName; - userEmail = "${super.monorepo.vars.email}"; + userEmail = super.monorepo.vars.email; + lfs.enable = lib.mkDefault config.monorepo.profiles.graphics.enable; + signing = { key = super.monorepo.vars.gpgKey; signByDefault = true; }; + # alias = { + # pl = "pull"; + # ps = "push"; + # co = "checkout"; + # c = "commit"; + # a = "add"; + # st = "status"; + # sw = "switch"; + # b = "branch"; + # }; + extraConfig = { init.defaultBranch = "main"; + credential."mail.${super.monorepo.vars.orgHost}" = { username = "${super.monorepo.vars.email}"; helper = "!f() { test \"$1\" = get && echo \"password=$(cat /run/user/1000/secrets/mail)\"; }; f"; @@ -3535,7 +3548,16 @@ Make sure those are set correctly. I've set it to sign by default. smtpserverport = 465; smtpencryption = "ssl"; }; + }; + # settings = { + # user = { + # name = super.monorepo.vars.fullName; + # email = super.monorepo.vars.email; + # }; + + + # }; aliases = { pl = "pull"; diff --git a/mindmap/LRC circuit.org b/mindmap/LRC circuit.org index 0df7bdc..51afe3c 100644 --- a/mindmap/LRC circuit.org +++ b/mindmap/LRC circuit.org @@ -5,7 +5,6 @@ #+title: LRC circuit #+author: Preston Pan #+description: Explanation of LRC Circuits - #+options: broken-links:t * Introduction @@ -44,21 +43,21 @@ another circuit diagram will include a possibly variable voltage source. * Mass-Spring Equation Equivalence We know these relations for the given circuit elements above: -\begin{align} +\begin{equation} v(t) = L\frac{di}{dt} \\ i(t) = C\frac{dv}{dt} \\ v = iR -\end{align} +\end{equation} if we analyze the current signal, Kirchhoff's voltage law tells us that the total voltage drop throughout this circuit is zero. We use the capacitor equation in integral form and sum the voltages: -\begin{align*} +\begin{equation} L\frac{di}{dt} + \frac{1}{C}\int i(t)dt + iR = 0 -\end{align*} +\end{equation} We then take a derivative to remove the integral: -\begin{align*} +\begin{equation} L\frac{d^{2}i}{dt^{2}} + R\frac{di}{dt} + \frac{1}{C}i = 0 \\ (LD^{2} + RD + \frac{1}{C}) i(t) = 0 -\end{align*} +\end{equation} it is clear that the characteristic polynomial of this homogeneous linear [[id:4be41e2e-52b9-4cd1-ac4c-7ecb57106692][differential equation]] is: \begin{align*} L\lambda^{2} + R\lambda + \frac{1}{C} = 0 @@ -144,8 +143,8 @@ i(t) = V_{0}e^{i\phi}\mathcal{L}^{-1}\{\frac{1}{(s - z_{1})(s - z_{2})(s - z_{3} where $z_{2}$ and $z_{3}$ are the two roots we found for the homogeneous case. We then use partial fraction decomposition: \begin{align} \label{} -\frac{1}{(s - z_{1})(s - z_{2})(s - z_{3})} = \frac{A}{s - z_{1}} + \frac{B}{s - z_{2}} + \frac{C}{s - z_{3}} \\ -A(s - z_{2})(s - z_{3}) + B(s - z_{1})(s - z_{3}) + C(s - z_{1})(s - z_{2}) = 1 +\frac{1}{(s - z_{1})(s - z_{2})(s - z_{3})} &= \frac{A}{s - z_{1}} + \frac{B}{s - z_{2}} + \frac{C}{s - z_{3}} \\ +A(s - z_{2})(s - z_{3}) + B(s - z_{1})(s - z_{3}) + C(s - z_{1})(s - z_{2}) &= 1 \end{align} from this we know: \begin{align} @@ -165,7 +164,7 @@ Now we want to eliminate B: \label{} [(z_{2} + z_{3}) - (z_{1} + z_{2})]A + [(z_{1} + z_{3}) - (z_{1} + z_{2})]B = 0 \\ (z_{3} - z_{1})A + (z_{3} - z_{2})B = 0 \\ -B = -\frac{z_{3} - z_{1}}{z_{3} - z_{2}}A \\ +B = -\frac{z_{3} - z_{1}}{z_{3} - z_{2}}A \end{align} finally, we have one equation in terms of A: \begin{align} @@ -186,10 +185,9 @@ C = \frac{z_{2} - z_{1}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1 \end{align} So we have the three coefficients: \begin{align} -\label{} -A = \frac{z_{3} - z_{2}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ -B = \frac{z_{1} - z_{3}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ -C = \frac{z_{2} - z_{1}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} +A &= \frac{z_{3} - z_{2}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ +B &= \frac{z_{1} - z_{3}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \\ +C &= \frac{z_{2} - z_{1}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} \end{align} The resulting solution looks like this: \begin{align} @@ -226,10 +224,10 @@ so the full solution including the terms used for the [[id:bc7e9e01-9721-4b3e-a8 i(t) = V_{0}e^{i\phi}(Ae^{z_{1}t} + Be^{z_{2}t} + Ce^{z_{3}t}) + (i'(0) + i(0))(De^{z_{2}t} + Ee^{z_{3}t}) \end{align} the sinusoidal part of the solution looks like this: -\begin{align} -\label{hello world} +\begin{equation} +\label{} \frac{(z_{3} - z_{2})V_{0}e^{i\phi}e^{2\pi i\omega t}}{z_{2}z_{3}^{2} + z_{1}z_{2}^{2} + z_{1}^{2}z_{3} - z_{1}z_{3}^{2} - z_{1}^{2}z_{2} - z_{2}^{2}z_{3}} -\end{align} +\end{equation} * Mass-Spring System Starting from [[id:6e2a9d7b-7010-41da-bd41-f5b2dba576d3][Newtonian mechanics]] in a single dimension: diff --git a/nix b/nix index 71a46de..acd6717 160000 --- a/nix +++ b/nix @@ -1 +1 @@ -Subproject commit 71a46de1309a6c496ecab5ca84a1a4ba6d0f6754 +Subproject commit acd671724d93675db85d68c670a53413bf95c773 diff --git a/tests/ci-build-stage-two.el b/tests/ci-build-stage-two.el index 3ab5c91..aca425d 100644 --- a/tests/ci-build-stage-two.el +++ b/tests/ci-build-stage-two.el @@ -22,10 +22,6 @@ (princ "STEP 5: before catppuccin\n" (quote external-debugging-output)) -(require 'catppuccin-theme) -(setq catppuccin-flavor 'mocha) -(load-theme 'catppuccin t) - (defun my-ci-force-fontification () "Ensure the buffer is fully colorized before htmlize touches it." (font-lock-ensure) diff --git a/tests/ci-build.el b/tests/ci-build.el index f72eb02..68d8670 100644 --- a/tests/ci-build.el +++ b/tests/ci-build.el @@ -11,9 +11,9 @@ (princ "STEP 0: tf\n" (quote external-debugging-output)) (setq noninteractive t) -(setq system-email "lol@troll.com") +(setq system-email "ci-runner@nullring.xyz") (setq system-username "ci-runner") -(setq system-fullname "Preston Pan") +(setq system-fullname "Preston Pan") ;; needed for postamble (setq system-gpgkey "00000000") (defun package-vc-install (&rest args) (message "blocked package-vc-install for %s" args)) (defun package-vc--unpack (&rest args) nil) @@ -40,4 +40,8 @@ (setq vc-handled-backends nil) (setq make-backup-files nil auto-save-default nil create-lockfiles nil) +(require 'catppuccin-theme) +(setq catppuccin-flavor 'mocha) +(load-theme 'catppuccin t) + (princ "STEP 1: init.el?\n" (quote external-debugging-output)) -- cgit v1.3