#+TITLE: Emacs configuration, literate style #+AUTHOR: Case Duckworth #+PROPERTY: header-args :tangle init.el #+OPTIONS: toc:nil #+BANKRUPTCY_COUNT: 2 * Bootstrap ** Original init.el #+begin_src emacs-lisp :tangle no ;; This file replaces itself with the actual configuration when ;; first run. To keep only this version in git, run this command: ;; ;; git update-index --assume-unchanged init.el ;; ;; If it needs to be changed, start tracking it again thusly: ;; ;; git update-index --no-assume-unchanged init.el (require 'org) (find-file (concat user-emacs-directory "config.org")) (org-babel-tangle) (load-file (concat user-emacs-directory "early-init.el")) (load-file (concat user-emacs-directory "init.el")) (byte-compile-file (concat user-emacs-directory "init.el")) #+end_src ** Tangling #+begin_src emacs-lisp ;; init.el -*- lexical-binding: t -*- (defun acdw/tangle-init () "If the current buffer is `config.org', tangle it, then compile and load the resulting files." (when (equal (buffer-file-name) (expand-file-name (concat user-emacs-directory "config.org"))) (let ((prog-mode-hook nil)) (require 'org) (org-babel-tangle-file (expand-file-name (concat user-emacs-directory "config.org")))))) (defun acdw/load-init () (interactive) (load-file (expand-file-name (concat user-emacs-directory "early-init.el"))) (load-file (expand-file-name (concat user-emacs-directory "init.el")))) #+end_src * Early initiation #+begin_src emacs-lisp :tangle early-init.el ;; early-init.el -*- lexical-binding: t; no-byte-compile: t -*- (setq load-prefer-newer t) (when (eq system-type 'windows-nt) (add-to-list 'exec-path "~/bin") (add-to-list 'exec-path "C:/Users/aduckworth/Downloads/PortableGit/bin")) (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) (setq straight-use-package-by-default t) (straight-use-package 'use-package) #+end_src * Theme I want to try using the [[https://github.com/kunalb/poet][Poet]] theme. #+begin_src emacs-lisp (use-package poet-theme) #+end_src I also want to switch themes between night and day. #+begin_src emacs-lisp (use-package theme-changer :custom (calendar-latitude 30.39) (calendar-longitude -91.83) :config (change-theme 'poet 'poet-dark)) #+end_src * Simplify GUI #+begin_src emacs-lisp (menu-bar-mode -1) (tool-bar-mode -1) (scroll-bar-mode -1) (global-visual-line-mode 1) #+end_src * Fonts #+begin_src emacs-lisp (require 'cl) (defun font-candidate (&rest fonts) (loop for font in fonts when (find-font (font-spec :name font)) return font)) (set-face-attribute 'default nil :font (font-candidate "Go Mono-11" "Consolas-11")) (set-face-attribute 'fixed-pitch nil :font (font-candidate "Go Mono-11" "Consolas-11")) (set-face-attribute 'variable-pitch nil :font (font-candidate "Go-12" "Georgia-11")) #+end_src ** Unicode #+begin_src emacs-lisp (use-package unicode-fonts :config (unicode-fonts-setup)) #+end_src ** Variable pitch faces #+begin_src emacs-lisp (add-hook 'text-mode-hook (lambda () (variable-pitch-mode 1))) #+end_ * TODO Emacs configuration [meta] ** Keep =~/.emacs.d= tidy * TODO Ease of use ** Selectrum ** Prescient ** CtrlF ** Startup ** Ignore case * TODO Persistence ** Auto-saves ** Backup files ** Recent files ** Save places in visited files ** Save history ** Undo * TODO General editing ** Undo ** Find/replace ** Expand region * TODO Writing ** Word count ** Visual fill column mode ** Org mode * TODO Coding ** Display *** Prettify symbols mode *** Parentheses and frens *** Line numbers ** Git ** Programming languages *** Shell *** Lisp *** Fennel *** Lua *** Web (HTML/CSS/JS) * Applications ** Elpher ** Pastebin (0x0)