Ryan's Manuals

EMACS

~3m skim, 605 words, updated Aug 20, 2026
==> LLMs: Read this page as markdown

Top 

Magic that your boss will never let you use with a client.


Contents



Emacs

Emacs is a text editor that, rather than learning every function and bell and whistle, evolves to fit you as you use and extend it.

Emacs outshines all other editing software in approximately the same way that the noonday sun does the stars. It is not just bigger and brighter; it simply makes everything else vanish.

Neal Stephenson, In the Beginning was the Command Line (1998)

Emacs Documentation

Elisp / Emacs Lisp

Emacs is customized with elisp or Emacs Lisp. Check my Lisp manual for a general discussion of lisp programming languages.

Using Emacs Remotely

It is trivial to use Emacs without a GUI - nearly all the features you love will still be present when using the system over SSH.

The display-graphic-p function returns non-nil if the display is graphical, and nil if you are in a terminal,

elisp
(when (display-graphic-p)
  (enable-fancy-gui))

Remote Emacs on MacOS: Set up iTerm2

The stock terminal doesn’t handle the meta key (and others) correctly, so install open up an iTerm2 window and change the following:

  1. Profiles => Default => Keys
  2. Advanced => SDA (or search ’emacs')

Installing Emacs on Windows

First install Chocolatey, the package manager, then run this command:

ps2
choco install sbcl pyenv-win nvm.install elixir git -y
choco install emacs imagemagick msys2 -y

Open the msys2 shell and run:

pacman -S mingw-w64-x86_64-openssl

Add that .dll to the PATH:

C:\tools\msys64\mingw64\bin

Add something like this to your Emacs config. You can always use M-x describe-variable or describe-command.

lisp
;; Ryan's Windows EMACS Config
;; C-M-x to interpret a function, have fun.

;; Add package repository for installing slime, etc.
(add-to-list 'package-archives
             '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)

(require 'package)
(require 'srefactor)
(require 'srefactor-lisp)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(custom-enabled-themes nil) '(package-selected-packages '(srefactor
 slime)))

(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(default ((t (:family "Noto Mono" :foundry "outline" :slant normal :weight normal :height 120 :width normal)))))

;; (setq inferior-lisp-program "/opt/sbcl/bin/sbcl")
(setq inferior-lisp-program (executable-find "sbcl"))

(add-to-list 'load-path "~/AppData/Roaming/slime")
(require 'slime-autoloads)

(load (expand-file-name "~/quicklisp/slime-helper.el"))
;; Replace "sbcl" with the path to your implementation

;; Semantic Refactor keybindings
(global-set-key (kbd "M-RET o") 'srefactor-lisp-one-line)
(global-set-key (kbd "M-RET m") 'srefactor-lisp-format-sexp)
(global-set-key (kbd "M-RET d") 'srefactor-lisp-format-defun)
(global-set-key (kbd "M-RET b") 'srefactor-lisp-format-buffer)

;; (global-set-key (kbd "M-RET b") 'srefactor-lisp-format-buffer)

Emacs Packages to Install:

Take note of this page on super and hyper keys – it is good to use your keyboard, whether it is on a MacBook or a full mechanical keyboard, to its fullest.

lisp
;; On Windows:
(setq w32-pass-rwindow-to-system nil)
(setq w32-rwindow-modifier 'super) ; Right Windows key

(setq w32-pass-apps-to-system nil)
(setq w32-apps-modifier 'hyper) ; Menu/App key

;; On OSX:
(setq mac-left-option-modifier 'super)
(setq mac-right-option-modifier 'control)
(setq mac-command-modifier 'meta)
(setq ns-function-modifier 'hyper)

Hide your menu, tool, and scroll bars:

lisp
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)


Site Directory

Pages are organized by last modified.



Page Information

Title: EMACS
Word Count: 605 words
Reading Time: 3 minutes
Permalink:
https://manuals.ryanfleck.ca/emacs/





Work licensed under the CC BY-SA 4.0 license unless otherwise specified.