GNU Emacs

See also

GNU Emacs
The official webpage for GNU Emacs.

GNU Emacs for Mac OS X

A tour of Emacs
A brief history and introduction to Emacs.

Installation

The following sections briefly describe where and how to install Emacs on the most common systems. One should install Emacs version 2x, where x > 3. If one’s system is not listed here, one might find help on installing Emacs in the official Emacs documentation or that of one’s host system.

Windows

Windows users can use the official Windows binary. One should download the zip-file and unpack it to one’s desired install location. No further installation should be necessary. More information on installation and setup can be found in the README file.

To try it out, one should run bin/emacs.exe from the Emacs installation folder. Emacs should start and a window should open. To stop Emacs and close this window,

  1. while pressing the control key, one should type x,
  2. while pressing the control key, one should type c, and then
  3. answer y.

To install Emacs shortcuts in one’s menu, one should run bin/addpm.exe.

Mac OS X

OS X users can find a “vanilla” Emacs for OS X which is recommended here. Alternatively Carbon Emacs and Aquamacs are variants of Emacs customized specifically for OS X.

Linux etc.

*nix users should use the package manager of their host system.

  • Ubuntu and Debian based systems: sudo apt install emacs
  • RedHat and Suse based systems: sudo yum install emacs
  • etc.

Setup

After installing Emacs, one should configure it by adding the following to one’s .emacs file which is the user configuration file for Emacs. To this end,

  1. press the control key and type x (i.e., C-x),
  2. press the control key and type f (i.e., C-f),
  3. type exactly ~/.emacs, and
  4. press the return key (the one written “enter” on the keyboard).

This maneuver will open up the .emacs file, which is most likely empty. Paste the following code into the buffer by pressing C-y:

(setq inhibit-startup-message t)  ; dont show the GNU splash screen
(transient-mark-mode t)           ; show selection from mark
(setq visible-bell 1)             ; turn off bip warnings
(show-paren-mode t)               ; turn on highlight paren mode
(fset 'yes-or-no-p 'y-or-n-p)     ; use y and n for questions
(global-font-lock-mode t)         ; enable syntax highlighting
(icomplete-mode 99)               ; better buffer switching

Now save the .emacs file by

  1. pressing the control key and typing x (i.e., C-x), and
  2. pressing the control key and typing s (i.e., C-s).

From now on, we will refer to the above sequence as C-x C-s, or in short C-x-s.

Bong-sun (to herself): So, Esc-Meta-Alt-Control-Shift. Hmm...

Version

Added the epigraph [18 Jan 2024]

Created [15 Jan 2024]

Table Of Contents

Previous topic

Tools

Next topic

Coq