Instructions on how to install and use Emacs on Windows 11, including supporting packages. Create a distraction-free content-creation machine.

Using Emacs on Windows 11: An Installation Guide

Peter Prevos

Peter Prevos |

975 words | 5 minutes

Share this content

This article describes how to install Emacs on Windows 10, including supporting packages. This article is part of the Emacs Writing Studio which explains how to use Emacs to undertake research and write and publish articles, books, and websites.

This article is part of Emacs Writing Studio, a book that explains how to use Emacs to undertake research and write and publish articles, books, and websites. Emacs Writing Studio is also available as an e-book from your favourite retailer.

Emacs Writing Studio

Emacs Writing Studio

A comprehensive guide for writers seeking to streamline their workflow using Emacs. The book covers everything from organising ideas and writing distraction-free to publishing in multiple formats. It’s perfect for both beginners and experienced Emacs users, offering practical tips and a tailored configuration to enhance your writing process.

The source files of the book and EWS configuration are also freely available on GitHub.

Installing Emacs on Windows 11

The first step is to download Emacs for Windows directly from its makers on the GNU website. You need the emacs-$VERSION-x86_64-installer.exe, where version is currently 29.4. This file contains a 64-bit build of Emacs with dependencies as an installer package.

Download this file and run the program to install Emacs on your system. You can now run Emacs like any other Windows software.

To upgrade Emacs in future, simply repeat this process.

But wait there is more. Emacs is neatly integrated with Linux systems, but to make it function properly on Windows some additional configuration steps and additional software is required.

Directories

Home Directory

The next step is to set the default folder for Emacs by setting the HOME variable. This variable instructs Emacs to use the C:\users\username\ folder as your home location. Open Powershell in administrator mode and enter this line:

  setx HOME %USERPROFILE%

You can also set this variable through the Windows Control Panel. Search for "environment" and click Edit System Variables and select Environment variables. Create a new variable called HOME and select your home folder and click OK.

In Emacs, your home folder is indicated with a tilde symbol. So lets say that your home folder is C:\Users\peter\ and you need the Downloads folder, then in Emacs refers to this location as ~/Downloads.

 

Emacs configuration folder

The location of the configuration folder depends on your operating system and Emacs version. If you are unsure where to store the init.el file, then you can use the Emacs help functionality. In most cases it will be something like ~/.emacs.d/. The dot at the start of the folder name means that it is hidden from view. To view the content of this folder in Windows you need to enable "Show hidden items" in the file explorer.

Type C-h v for help on variables and type user-emacs-directory and enter. The help buffer that now appears provides the correct folder name.

Read my article on configuring Emacs for more information.

External Software

Emacs is not a text editor, it is a computing platform with a built-in text editor. Emacs can also act as an interface to other Open Source free software. Most of these packages are included in common Linux distributions. Windows users need to use a bit more effort to install these.

Reading documents and ebooks

Emacs is great at displaying plain text but needs some assistance with reading other formats. The basic emacs package to view documents other than plain text is Doc-View. The image below explains the external packages required to read ebooks and articles.

For PDF documents you need to install Ghostscript or MuPDF. The pdftotext program from the Poppler software helps with finding and copying text in a PDF.

To read and export to office documents (MS Office and LibreOffice), Emacs needs to have acces to the LibreOffice software. Emacs uses this software to convert office documents to PDF and display them with the DocView package. LibreOffice can also assist with exporting Org mode files to office formats or to PDF.

To view EPub files you need a version of the zip and unzip programs. You can find these programs, and many others, in the GnuWin32 project.

You also need to tell Emacs where these tools live, so you need to customise the exec-path variable.

Document conversion in Doc-View
Document conversion in Doc-View.

For more information on reading non-text files in Emacs see my article on reading ebooks.

 

Spellcheck

The Flyspell package performs spell checking on Emacs. Read the distraction-free writing for more information on how to configure spell-checking.

The ezwinports project maintains a large collection of useful open source software compiled for Windows computers, including Hunspell.

To install Hunspell on Windows, download the software from ezwinports. Extract the files in a folder on your drive, for example: C:\ProgramData\ezwinports\.

You need to add the bin folder to your path environment variable. A simple workaround is to add the full path of the Hunspell variable to your configuration, as such:

(setq-default ispell-program-name "C:/ProgramData/ezwinports/bin/hunspell")

Note that Emacs uses a forward slash /, not the Windows backslash \.

The binary distribution includes dictionaries for US English and UK English. You can find the dictionaries for other languages on the Internet; install them into share/hunspell directory in your Hunspell installation directory.

Using Emacs on Windows 11

This article only discussed how to install Emacs on Windows 11. The other articles on this website show you how to configure Emacs and how to use Emacs to research, write and publish articles, books and websites.

The EWS GitHub repository contains the latest information about the required external software.

Emacs is a malleable system, so everybody will have their personal preferences to undertake a task. Any article on how to be productive with Emacs is thus opinionated. If you have a different way of doing things, please share your views and leave a comment below, or complete the contact form to send me an email.

Share this content

You might also enjoy reading these articles

Writing Prose with Emacs

Exploring Your Ideas With the Denote-Explore Package

Reading eBooks with Emacs