I have been using EMACS under Windows for quite some time, starting with EMACS 20.7 under Windows 98SE. I am using EMACS now under Windows 10 Pro both 32‑bit and 64‑bit.
My main use cases are software development for micro-controllers and creating documentation. For documentation I use EMACS' org-mode and HTML export.
I describe here how I install, configure and use EMACS under Windows. Use this advice at your own risk. I do not take any responsibility for this.
I have the following requirements:
To have the same set-up on multiple PCs, I use the OneDrive feature of Windows, which provides automatic synchronisation via Microsoft's cloud.
You might want to download the 32‑bit version from the official web-site http://ftp.gnu.org/gnu/emacs/windows/. In my case (Nov. 2016) the files were:
emacs-25.1-i686-w64-mingw32.zip 48.968KB emacs-25.1-i686-w64-mingw32.zip.sig 1KB emacs-25-i686-deps.zip 36.415KB emacs-25-i686-deps.zip.sig 1KB emacs-25-win-README.txt
To use EMACS from several PCs, "install" EMACS by extracting to a new directory on your OneDrive
Please substitute "xyz" with your account name. EMACS uses the
environment variable, which is not existing by default under Windows.
To create it, type "environment" in the Windows Search input box and
select "Environment variables for this user". Specify for
I recommend to run EMACS in server mode. For this please create
another environment variable
EMACS_SERVER_FILE which shall read
Server mode is very fast to start editing a file. For house keeping purposes, the EMACS server will create a special file. You want that special file on your private space, because it needs to be specific for a PC. Thus is shall not be located on the OneDrive.
For this to work, you also need to customise the EMACS variable
server-auth-dir. To do this form within EMACS you could do
Describe, Describe Variable ... input
server-auth-dir and then
follow the instructions. You should set this variable matching the
EMACS_SERVER_FILE environment variable you set above.
Notice that this time, you specify a directory called
EMACS_SERVER_FILE you specified a file called
which lives in that
server directory. In other words: the
EMACS_SERVER_FILE and the EMACS variable
server-auth-dir need to match.
To arrange to have the EMACS server started when you log-in, do
shell:startup and create in this directory a shortcut with the
The EMACS server will run in the background. You could see it in Task Manager.
Under EMACS 20.7 I had a file called
_emacs in the
to contain my customisations. With EMACS 25.1 you might want to follow
the recommendation to call the file
init.el and put it in directory
When you do customisations within EMACS via the menu
Customize, EMACS will also write to
init.el. You might want to
consult my init.el. I contains various types of
Ctrl‑tabto cycle the buffers in one window. I had to "steal" and adapt some E-Lisp code to achieve this. The code skips "uninteresting" buffers like
*messages*and the like. You could customise these buffers by editing the variable
visual-basic-mode. Note that
visual-basic-modedoes not come out of the box with EMACS 25.1.
The simplest and least intrusive way to integrate EMACS with the
Windows GUI is to use
Send-To. That is when you right click a file
in Explorer there is the
Send-To option in the pop-up menu.
To add EMACS to the
Send-To targets, create a short-cut in the
folder. You find this folder by pasting
in the Windows search box. Then you put a short-cut with command line
in it and give the shortcut the name EMACS.
Another way to integrate with the Windows GUI is to have EMACS editing a file when double-clicking. However, since Windows Vista there is no more GUI support to customise associating a file to open in a program. Hence I recommend the following:
This will select the correct executable, but it misses a command line
-n to go with it. To fix this, open the (User-)Registry and
Replace abc with the file extension of the file you where treating. There you should find the command line
you specified above. Edit it and include the
-n switch. This makes
emacsclientw.exe just hands over the file to the EMACS
server and then terminates as it should.
Under Windows 10 64‑bit there is the possibility to use the Windows Subsystem for Linux (WSL). That allows to use EMACS and other related Linux tools like under standard Linux distributions, but integrated with Windows and without the need to run a vritual machine.
The advantage of this is that numerous tools, e.g. spell checking, are easy to install in that Linux environment and they are usually well integrated with EMACS. On Windows most of these tools are available as well but installation and setting-up the integration with EMACS require more work.
When I wrote this (2019-04), there were still problems with screen
updates from EMACS in text mode under WSL. The standard terminal
xterm-256color would not work. Setting
would work though.
As I want to keep using PCs with Windows 10 32‑bit, I continue to use the Windows native EMACS.
However I do use WSL successfully for other purposes.