Skip to content

Instantly share code, notes, and snippets.

@ericchansen
Last active April 15, 2026 03:36
Show Gist options
  • Select an option

  • Save ericchansen/5170883f02d5d94030072baf74b7f529 to your computer and use it in GitHub Desktop.

Select an option

Save ericchansen/5170883f02d5d94030072baf74b7f529 to your computer and use it in GitHub Desktop.
.emacs_on_windows
;;; .emacs_on_windows --- Bootstrap Emacs config on Windows -*- lexical-binding: t; -*-
;; On Windows, Emacs looks for init files in %APPDATA% by default.
;; Place this file at C:\Users\<username>\AppData\Roaming\.emacs
;; and update the paths below to point to your real config.
;; This lets you keep your .emacs and .emacs.d wherever you want
;; (e.g., a Git repo, a secondary drive, etc.).
;; Place this file in C:\Users\<username>\AppData\Roaming and point to the appropriate files
(setq user-init-file "C:/path/to/.emacs")
(setq user-emacs-directory "C:/path/to/.emacs.d/")
(setq default-directory "C:/whatever/you/want/to/start/in")
(setenv "HOME" "D:/my/home/directory")
(load user-init-file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment