Skip to content

jamartin9/emacs-config

Repository files navigation

emacs-config

This configuration is for emacs >= 29

Third party packages:

guix: package/environment management. alternative is cli and setting exec-path-from-shell/environment

eat: graphical terminal emulation. alternative is built-in multi-term w/o visual commands

magit/forge/code-review: git/forge manipulation. alternative is built-in vc that lacks complex workflows like interactive rebase, forge pull requests or code review comments

debbugs: track emacs/guix bugs. alternative is bookmarking websites/mailing lists

transmission: manage torrent client. alternative is cli

org-roam: tag system for note database. alternative is org-node or self devised naming/search scheme with a datetree journal

undo-tree: undo edit persist restarts. alternative is built-in undo with session persistence redone

company: automatic typing suggestions. alternative is corfu with cape

minions-mode: keeps the modeline visually brief with retained information. alternative is diminish/delight packages and config for each mode

osm: Map tile viewer. alternative is web browser viewing

gptel: interface with llms alternative is llm package or cli

dape/geiser-guile/pyvenv/(rust,yaml,python)-tree-sitter/combobulate?/eglot-x?: language specific modes with more than regex

Clone

Branch names diverging and “.” complicate fetching the correct heads.

git clone --single-branch --recurse-submodules --shallow-submodules --depth=1 git@github.com:jamartin9/emacs-config.git
# get branch heads
git submodule foreach 'git checkout master'

Tangle Install

Emacs untangles the script from the org file (using noweb to copy/eval code) while expanding INCLUDE directives. Tangling is rerun when the org file is newer than the script (if present) and the html file. Cleanup is done via the clean arguments to the make-el wrapper. The wrapper is needed for org-roam, org-ids and html export tags.

pwsh make-el.ps1 install

Link

Installable org files tangle to a script of the same name for installation. The script needs itself and emacs on the PATH or CWD.

(ignore-errors
      (make-symbolic-link (file-name-directory (or load-file-name buffer-file-name)) (concat (file-name-as-directory (if (getenv "XDG_CONFIG_HOME") (getenv "XDG_CONFIG_HOME") (concat (file-name-as-directory (getenv "HOME")) ".config"))) "emacs")))

Run

The one line org-mode sesquicolon ‘shebang’ is a multipart shell/powershell wrapper. Passed arguments to the elisp script are available by argv (ignoring “–” and “$@”). To run with powershell use the same wrapper format with a .ps1 extension.

":"; emacs -Q --script README.sh -- $@ $args ; exit $? # -*- mode: emacs-lisp; lexical-binding: t; -*-

Cherry Picking

Copy files by url with emacs

(url-copy-file "https://raw.githubusercontent.com/jamartin9/emacs-config/master/init.el" "init.el")
(url-copy-file "https://raw.githubusercontent.com/jamartin9/emacs-config/master/early-init.el" "early-init.el")
(call-process "git" nil t nil "clone" "https://github.com/jamartin9/emacs-config")

Site

Clone the site

git worktree add --track -b gh-pages ./gh-pages origin/gh-pages

Build the updated site

pwsh make-el.ps1 site