GNU Emacs FAQ for MS Windows

This is the FAQ for using GNU Emacs on MS Windows, as distributed with Emacs 24.5.

This FAQ is maintained by the developers and users of Emacs on MS Windows. If you find any errors, or have any suggestions, please send them to the help-emacs-windows mailing list.

At time of writing, the latest version of GNU Emacs is version 24.5.

Copyright © 2008, 2010-2015 Free Software Foundation, Inc.

This list of frequently asked questions about GNU Emacs on MS Windows with answers (“FAQ”) may be translated into other languages, transformed into other formats (e.g. Texinfo, Info, WWW), and updated with new information.

The same conditions apply to any derivative of the FAQ as apply to the FAQ itself. Every copy of the FAQ must include this notice or an approved translation, information on who is currently maintaining the FAQ and how to contact them (including their e-mail address), and information on where the latest version of the FAQ is archived (including FTP information).

The FAQ may be copied and redistributed under these conditions, except that the FAQ may not be embedded in a larger literary work unless that work itself allows free copying and redistribution.

Table of Contents

Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

This FAQ covers questions that are specific to running GNU Emacs on Windows. For more general information, see the other Emacs manuals. See Further information.

Next: , Up: Introduction   [Contents][Index]

1.1 Why support GNU Emacs on Windows?

It is not our goal to “help Windows users” by making text editing on Windows more convenient. We aim to replace proprietary software, not to enhance it. So why support GNU Emacs on Windows?

We hope that the experience of using GNU Emacs on Windows will give programmers a taste of freedom, and that this will later inspire them to move to a free operating system such as GNU/Linux. That is the main valid reason to support free applications on nonfree operating systems.

Next: , Previous: , Up: Introduction   [Contents][Index]

1.2 Which versions of Windows are supported?

Emacs 24.5 is known to run on all versions of Windows from Windows 98 and Windows NT 4.0 through to Windows 8.1. The Windows port is built using the Win32 API and supports most features of the X version, including variable width fonts, images and tooltips.

Emacs on Windows can be compiled as either a 32-bit or a 64-bit executable, using the MinGW GCC compiler and development tools.

Previous: , Up: Introduction   [Contents][Index]

1.3 What other versions of Emacs run on Windows?

See Cygwin.

Emacs can also be compiled for MSDOS. When run on recent MS Windows, it supports long file names, and uses the Windows clipboard. See the msdos directory in the Emacs sources for building instructions (requires DJGPP).

Next: , Previous: , Up: Top   [Contents][Index]

2 Getting Emacs

Next: , Up: Getting Emacs   [Contents][Index]

2.1 Where can I download Emacs?

Pre-compiled versions are distributed from mirrors. Emacs binaries are distributed as zip files, digitally signed by the developer who built them. Generally most users will want the file for the 32-bit build, and for the 64-bit build. The zip archive contains everything you need to get started.

The latest source is available from mirrors. It is distributed as a compressed tar file, digitally signed by the maintainer who made the release.

The development version of Emacs is available from Savannah, the GNU development site.

Next: , Previous: , Up: Getting Emacs   [Contents][Index]

2.2 How can I compile Emacs myself?

To compile Emacs on Windows, you will need the MinGW port of GCC and Binutils, the MinGW runtime and development environment, and the MSYS suite of tools. For the details, see the file nt/INSTALL in the Emacs source distribution.

Support for displaying images, as well as XML/HTML rendering and TLS networking requires external libraries, the headers and import libraries for which will need to be installed where your compiler can find them. Again, the details, including URLs of sites where you can download these libraries are in nt/INSTALL. See Other useful ports, for auxiliary tools you may wish to install and use in conjunction with Emacs.

After unpacking the source, or checking out of the repository, be sure to read the instructions in nt/README and nt/INSTALL.

Previous: , Up: Getting Emacs   [Contents][Index]

2.3 How do I use a debugger on Emacs?

By default, Emacs is compiled with debugging on, and optimizations enabled. The optimizations may interfere with some types of debugging; the debugger may not show clearly where it is, or may not be able to inspect certain variables. If this is the case, reconfigure with CFLAGS='-O0 -g3'

The file etc/DEBUG contains general debugging hints, as well as specific notes about debugging Emacs.

GDB is the GNU debugger, which can be used to debug Emacs when it has been compiled with MinGW GCC. The best results will be obtained if you start gdb from the src directory as gdb ./emacs.exe. This will load the init file .gdbinit1 in that directory, to define some extra commands for working with lisp while debugging, and set up breakpoints to catch abnormal aborts.

A Windows port of GDB can be found on MinGW download sites and on some others.

Next: , Previous: , Up: Top   [Contents][Index]

3 Installing Emacs

Next: , Up: Installing Emacs   [Contents][Index]

3.1 How do I unpack the distributions?

The binary distributions are distributed as zip files, which are handled natively by Windows XP and later. For earlier versions, there are many tools that can handle the zip format, from InfoZip’s command line unzip tool, to 7zip’s multi-format graphical archive explorer. (Although popular, WinZip has caused problems with line-ends in the past, and is not Free software, so we do not recommend it.)

Source distributions are distributed as .tar.gz or .tar.xz files. 7zip and similar multi-format graphical tools can handle these, or you can get Windows ports of the command line gzip and tar tools from multiple sources, or use bsdtar. See Other useful ports.

The command to unpack a source distribution from the command line is:

tar xzf emacs-24.5.tar.gz

If this does not work with the versions of tar and gzip that you have, you may need to try a two step process:

gzip -dc emacs-24.5.tar.gz | tar xf -

You may see many messages from tar complaining about being unable to change the modification time on directories, and from gzip complaining about a broken pipe. These messages are usually harmless, caused by incomplete ports that are not fully aware of the limitations of Windows.

And here’s an example of using bsdtar (from the ‘libarchive’ package) to unpack a .tar.xz archive:

bsdtar -xf emacs-24.5.tar.xz

Expect bsdtar to unpack the whole distribution without any complaints.

Once you unpack the source distribution, look in nt/INSTALL file for build instructions.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.2 How do I install Emacs after unpacking the binary zip?

You can run Emacs without any extra steps, but if you want icons in your Start Menu, or for Emacs to detect the image libraries that are already installed on your system as part of GTK, then you should run the program addpm.exe, which is usually installed into the same bin directory with emacs.exe.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.3 How do I get image support?

Emacs has built in support for XBM and PBM/PGM/PPM images. This is sufficient to see the monochrome splash screen and tool-bar icons. Since v22.2, the official precompiled binaries for Windows have bundled libXpm, which is required to display the color versions of those images.

Emacs is compiled to recognize JPEG, PNG, GIF, TIFF, and RSVG images also, but displaying these image types require external DLLs which are not bundled with Emacs. See Other useful ports.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.4 What is my init file?

When Emacs starts up, it attempts to load and execute the contents of a file commonly called .emacs (though it may have other names, see Where do I put my init file?) which contains any customizations you have made. You can manually add lisp code to your .emacs, or you can use the Customization interface accessible from the Options menu. If the file does not exist, Emacs will start with the default settings.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.5 Where do I put my init file?

On Windows, the .emacs file may be called _emacs for backward compatibility with DOS and FAT filesystems where filenames could not start with a dot. Some users prefer to continue using such a name due to historical problems various Windows tools had in the past with file names that begin with a dot. In Emacs 22 and later, the init file may also be called .emacs.d/init.el. Many of the other files that are created by lisp packages are now stored in the .emacs.d directory too, so this keeps all your Emacs related files in one place.

All the files mentioned above should go in your HOME directory. The HOME directory is determined by following the steps below:

  1. If the environment variable HOME is set, use the directory it indicates.
  2. If the registry entry HKCU\SOFTWARE\GNU\Emacs\HOME is set, use the directory it indicates.
  3. If the registry entry HKLM\SOFTWARE\GNU\Emacs\HOME is set, use the directory it indicates. Not recommended, as it results in users sharing the same HOME directory.
  4. If C:\.emacs exists, then use C:/. This is for backward compatibility, as previous versions defaulted to C:/ if HOME was not set.
  5. Use the user’s AppData directory, usually a directory called AppData under the user’s profile directory, the location of which varies according to Windows version and whether the computer is part of a domain.

Within Emacs, ~ at the beginning of a file name is expanded to your HOME directory, so you can always find your .emacs file by typing the command C-x C-f ~/.emacs.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.6 Troubleshooting init file problems

If you’ve set HOME to a directory using one of the above methods, and Emacs still doesn’t load your init file, the first thing you should do is check to see what Emacs thinks HOME is set to. You can do this by evaluating the following expression in the *scratch* buffer using C-x C-e:

(getenv "HOME")

Look carefully at what is printed in the echo area, and make sure the value is valid. For example, if the value has trailing whitespace, Emacs won’t be able to find the directory. Also, be sure that the value isn’t a relative drive letter (e.g., d: without a backslash or a forward slash after the colon); if it is, then HOME is going to be whatever the current directory on that drive is, which is likely not what you want to happen.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.7 How do I associate files with Emacs?

The recommended way to associate files is to associate them with emacsclientw.exe. In order for this to work when Emacs is not yet started, you will also need to set the environment variable ALTERNATE_EDITOR to runemacs.exe. To open files in a running instance of Emacs, you will need to add the following to your init file:


Up: Associate files with Emacs   [Contents][Index]

3.7.1 For use with Internet Explorer

You can use Emacs as the editor for composing mail for ‘mailto:’ links, reading usenet for ‘news:’ links, and viewing source. The following registry entries control this:

Thanks to Jason Rumney and Sigbjorn Finne for these tips.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.8 How do I use find-file to open files that are on the Desktop?

The location of the Desktop varies between different versions of Windows, and in a corporate environment can be moved around by the network administrator. On latest Windows versions, you can use the value of the USERPROFILE environment variable to find where the desktop might be:

C-x C-f $USERPROFILE/Desktop

If this doesn’t work, then you probably have to forgo the keyboard just this once, and either drag a file onto the Emacs frame from the desktop, or use the file dialog (displayed when you use the toolbar or menu by default). Once you have a file from the Desktop inside Emacs, C-x C-f will quickly reveal where your desktop is kept.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.9 How can I modify Windows to act more like X?

Next: , Up: Make Windows more like X   [Contents][Index]

3.9.1 How do I make the active window follow the mouse?

Customize the variables focus-follows-mouse and mouse-autoselect-window. The former can be used to mislead Emacs into giving focus to other frames when the mouse is over them, even though Windows has a click to focus policy by default (there is software available to change that though). The latter can be used to make Emacs use a focus-follow-mouse policy within its own frames.

You can also change the Windows click-to-focus policy by changing settings in the Registry. The details vary according to your Windows version; look on the Internet for instructions to enable “active window tracking” for your version of Windows.

Previous: , Up: Make Windows more like X   [Contents][Index]

3.9.2 How do I swap CapsLock and Control?

This cannot be done within Emacs, but you can modify the scan code mappings in the registry or define a new keyboard layout to swap the keys on a system wide basis.

Next: , Up: Swap CapsLock and Control   [Contents][Index] Windows NT/2000/XP/Vista?

Previous: , Up: Swap CapsLock and Control   [Contents][Index] Windows 95/98/ME

Microsoft has a tool called keyremap that is part of their Kernel Toys add ons for Windows 95. The tool has also been confirmed to work on Windows 98.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.10 How can I modify Emacs to act more like a Windows app?

Many beginning users find Emacs difficult to use because its user interface is different in many ways. Emacs predates most UI standards, and experienced Emacs users are used to the way things are, so changing the defaults is difficult. Most of the “standard” behavior can be approximated in Emacs after some configuring though.

Next: , Up: Make Emacs like a Windows app   [Contents][Index]

3.10.1 Highlighting the selection

Emacs has a concept of a mark and point that is similar to selections in other programs. But the mark in Emacs is used for more than just defining the selected region, it lives on while you continue to edit and move around the buffer so it can also be a kind of bookmark. The history of marks is saved so you can pop previous marks back to the top of the stack to go back to somewhere you were some time ago. Because of this dual purpose, the region between mark and point is not highlighted by default unless you select a region by clicking and dragging the mouse.

The minor mode transient-mark-mode changes the behavior of the mark in two ways. First, it distinguishes between an active mark that has just been defined or reactivated, and an inactive mark. When the mark is active, some commands that normally act on lines, words, buffers etc. will instead act on the region. An inactive mark needs to be reactivated to operate on it, unless mark-even-if-inactive is set. Secondly, transient-mark-mode also highlights the region when it is active, providing the same visual clue that you get in other programs. This mode is turned on by default in latest versions of Emacs.

In addition to seeing the highlighting, new Emacs users often expect editing commands to replace the region when it is active. This behavior can be obtained with delete-selection-mode, but see the following question also.

Previous: , Up: Make Emacs like a Windows app   [Contents][Index]

3.10.2 Standard Windows key bindings

The keybindings of Emacs predate modern GUIs, and the keys that were chosen by later GUIs for cut and copy were given important functions as extended keymaps in Emacs. CUA mode attempts to let both bindings co-exist by defining C-x and C-c as kill-region and copy-region-as-kill when the region is active, and letting them have their normal Emacs bindings when the region is not active. Many people find this to be an acceptable compromise. CUA mode also defines a number of other keys (C-v, Shift selection), and can be turned on from the Options menu.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.11 Window operations

The function w32-send-sys-command can be used to simulate choosing commands from the system menu (in the top left corner of the Window) and a few other system wide functions. It takes an integer argument, the value of which should be a valid WM_SYSCOMMAND message as documented in Microsoft’s API documentation.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.12 How do I uninstall Emacs?

Emacs does not come with an uninstall program. No files are installed outside of the directories you find in the binary zip archive, so deleting those directories is sufficient to clean away the files. If you ran addpm, you’ll need to delete the Start Menu group too. The registry entries inserted by addpm will not cause any problems if you leave them there, but for the sake of completeness, you can use regedit to remove the keys under HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER: SOFTWARE\GNU\Emacs, and the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\emacs.exe if it exists.

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.13 When I run Emacs nothing happens

Emacs could have failed to run for a number of reasons. The most common symptom is that, when Emacs is started, the cursor changes for a second but nothing happens. If this happens to you, it is quite likely that the distribution was unpacked incorrectly.

Check for the following to see if there was a problem during unpacking:

  1. Be sure to disable the CR/LF translation or the executables will be unusable. Older versions of WinZipNT would enable this translation by default. If you are using WinZipNT, disable it.
  2. Check that filenames were not truncated to 8.3. For example, there should be a file CONTRIBUTE in the top level directory; if this has been truncated to CONTRIBU or CONTRI~1, your distribution has been corrupted while unpacking and Emacs will not start.

If it is still not working, send mail to the mailing list, describing what you’ve done, and what you are seeing. (The more information you send the more likely it is that you’ll receive a helpful response.)

Next: , Previous: , Up: Installing Emacs   [Contents][Index]

3.14 Does Emacs contain a virus?

There have been reports in the past that some virus scanners claim that the Emacs distribution has a virus. This is extremely unlikely if you have downloaded Emacs from the GNU FTP site or one of its mirrors and the GPG signature for it is valid and listed in the GNU keyring, unless perhaps it is a new release made in the last few days, in which case you should exercise more caution and report the problem. Past problems seem to have been caused by virus checkers running into a buffer size limit when unpacking large tar.gz files for scanning, and reporting the failure as an “unknown virus”.

Previous: , Up: Installing Emacs   [Contents][Index]

3.15 What known problems are there with anti-virus software?

Anti-virus and firewall software can block Emacs from starting subprocesses and opening network connections. Most such products have an Advanced mode where they will prompt you rather than silently blocking. In some cases the “scan all files” or “auto protect” option of anti-virus programs has caused failures running shell related commands within Emacs. See Why is nothing happening when I enter shell commands?.

Next: , Previous: , Up: Top   [Contents][Index]

4 Display Settings

Next: , Up: Display Settings   [Contents][Index]

4.1 Emacs in console mode goes beyond the window size

The variable w32-use-full-screen-buffer controls whether Emacs uses the window size or buffer size to determine the number of lines on screen. Normally the window size is correct, but when running Emacs over some telnet servers, the buffer size needs to be used. Emacs tries to guess the correct value at startup, but if it guesses wrong, you can customize that variable yourself.

Next: , Previous: , Up: Display Settings   [Contents][Index]

4.2 What do I do if I have problems with my mouse buttons?

Emacs assigns bindings assuming a three button mouse. On Windows, if a two button mouse is detected, a hack is enabled which lets you simulate the third button by pressing both mouse buttons simultaneously. w32-mouse-button-tolerance defines the timeout for what is considered “simultaneous”. You can check how many buttons Emacs thinks your mouse has with C-h v w32-num-mouse-buttons.

If you find yourself needing the mouse-3 bindings more often than mouse-2, you can swap the buttons with the following code in your init file:

(setq w32-swap-mouse-buttons t)

Next: , Previous: , Up: Display Settings   [Contents][Index]

4.3 How do I cut and paste text with NUL characters?

If you attempt to cut and paste text with NUL characters embedded in it, then the text will be truncated at the first NUL character. This is a limitation of the Windows clipboard, and does not affect killing and yanking from the kill-ring within Emacs.

Next: , Previous: , Up: Display Settings   [Contents][Index]

4.4 How can I fix garbled text yanked from the clipboard?

You can try set-selection-coding-system, but generally such corruption is a thing of the past, as Emacs uses Unicode for the clipboard by default now.

Previous: , Up: Display Settings   [Contents][Index]

4.5 How do I change the sound of the Emacs beep?

You can use the function set-message-beep to change the sound that Emacs uses for its beep. This affects both console and GUI frames. The doc string contains a list of the system sounds you can use.

Next: , Previous: , Up: Top   [Contents][Index]

5 Fonts and text translation

Next: , Up: Fonts and text translation   [Contents][Index]

5.1 Font names

Fonts in Emacs 22 and earlier are named using the X Logical Font Description (XLFD) format. Emacs on Windows ignores many of the fields, and populates them with * when listing fonts. Former maintainer Andrew Innes wrote this explanation of what each field in the font string means and how Emacs treated them back in 19.34. Since then, multilingual support and a redisplay overhaul to support variable width fonts have changed things slightly; more character sets are recognized (and the old pseudo character sets are deprecated), and the resolution fields are used to calculate the difference between point and pixel sizes, but normally you should leave these at the system default. The foundry field is also populated with an indication of whether the font is outline (.TTF, .ATM) or raster (.FON) based when fonts are listed, which may let you differentiate between two fonts with the same name and different technologies.

Starting with Emacs 23, the preferred font name format will be moving to the simpler and more flexible fontconfig format. XLFD names will continue to be supported for backward compatibility.

XLFD: -*-Courier New-normal-r-*-*-13-*-*-*-c-*-iso8859-1
Fontconfig: Courier New-13

To find the XFLD name for a font, you can execute the following in the *scratch* buffer by pressing C-j at the end of the line:

(w32-select-font nil t)

To see a complete list of fonts, execute the following in the *scratch* buffer by pressing C-x C-e at the end of the line:

(insert (prin1-to-string (x-list-fonts "*")))

The command line options and frame-parameters for changing the default font in Emacs are documented in the manual. Fonts can also be used when defining faces, though family and size are generally specified individually there. In addition, Emacs on Windows reads the registry to find X Resources. This is also documented in the manual.

Next: , Previous: , Up: Fonts and text translation   [Contents][Index]

5.2 How can I get bold and italic fonts to work?

Emacs will only use the italic (and bold) versions of a font automatically if it has the same width as the normal version. Many fonts have italic and bold versions that are slightly wider. It will also only use real bold and italic fonts by default, where other applications may use synthesized variations that are derived from the normal font. To enable more italic and bold fonts to be displayed, you can enable synthesized fonts and manually set the font for italic, bold and bold-italic as follows:

(setq w32-enable-synthesized-fonts t)
(set-face-font 'italic "-*-Courier New-normal-i-*-*-11-*-*-*-c-*-iso8859-1")
(set-face-font 'bold-italic "-*-Courier New-bold-i-*-*-11-*-*-*-c-*-iso8859-1")

The w32-enable-synthesized-fonts variable is obsolete starting from Emacs 24.4, as Emacs no longer has this limitation.

Next: , Previous: , Up: Fonts and text translation   [Contents][Index]

5.3 Multilingual font support

Next: , Up: Multilingual fonts   [Contents][Index]

5.3.1 Is it possible to display all the supported languages?

To display all the languages that Emacs is capable of displaying, you will require the BDF fonts from the GNU intlfonts package. See How do I use bdf fonts with Emacs?.

For many languages, native truetype fonts are sufficient, and in Emacs 23 the need for BDF fonts will disappear for almost all languages. At the time of writing, all supported characters are able to be displayed with appropriate truetype or opentype fonts.

Next: , Previous: , Up: Multilingual fonts   [Contents][Index]

5.3.2 How do I get Emacs to display non-latin characters?

Recent versions of Emacs display a large range of characters out of the box, but if you are having problems with a particular character set which you know you have fonts for, you can try defining a new fontset with create-fontset-from-ascii-font or create-fontset-from-fontset-spec.

 "-*-Courier New-normal-r-*-*-12-*-*-*-c-*-fontset-most,
 latin-iso8859-2:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-2,
 latin-iso8859-3:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-3,
 latin-iso8859-4:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-4,
 cyrillic-iso8859-5:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-5,
 greek-iso8859-7:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-7,
 latin-iso8859-9:-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-9,
 japanese-jisx0208:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis,
 katakana-jisx0201:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis,
 latin-jisx0201:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis,
 japanese-jisx0208-1978:-*-MS Gothic-normal-r-*-*-12-*-*-*-c-*-jisx0208-sjis,
 chinese-gb2312:-*-MS Song-normal-r-*-*-12-*-*-*-c-*-gb2312-*,
 chinese-big5-2:-*-MingLiU-normal-r-*-*-12-*-*-*-c-*-big5-*" t)

Alternatively, you can augment the default fontset with information of which fonts to use for certain ranges of characters or for specific scripts/character sets. See Modifying Fontsets in The GNU Emacs Manual, for details and some useful examples.

Next: , Previous: , Up: Multilingual fonts   [Contents][Index]

5.3.3 Where can I find fonts for other languages?

In addition to the wide range of fonts that come with the language support packages of various components of Windows itself, GNU/Linux distributions these days come with a number of Free truetype fonts that cover a wide range of languages. The GNU Unifont project contains glyphs for most of the Unicode codespace, and can be downloaded from mirrors.

Next: , Previous: , Up: Multilingual fonts   [Contents][Index]

5.3.4 How do I use third party programs to display multibyte characters?

You probably only need to do this on the non-Unicode versions of Windows (95, 98 and ME), and even then, various Windows and Internet Explorer updates have made third party software unnecessary in most cases. If you are having trouble displaying text, try defining a fontset with the font for the languages that the third party software handles set to what that software expects (which may not be an appropriate font for that language, but the third party software is intercepting it and using a different font behind the scenes). See Non-latin display.

Previous: , Up: Multilingual fonts   [Contents][Index]

5.3.5 Can I use a font with a name in my language?

Normally Emacs should initialize locale-coding-system appropriately based on your locale, which will let Emacs use font names in your local language successfully.

Next: , Previous: , Up: Fonts and text translation   [Contents][Index]

5.4 How can I have Emacs use a font menu like on X?

Place the following in your init file:

(setq w32-use-w32-font-dialog nil)

Up: Font menu   [Contents][Index]

5.4.1 How can I add my font to the font menu?

If you have set w32-use-w32-font-dialog to nil, you can add fonts to the font menu by changing w32-fixed-font-alist. For example:

(setq w32-fixed-font-alist
   (append w32-fixed-font-alist
         ("8" "-**-*-11-*-*-*-c-iso8859-1")
         ("9" "-**-*-12-*-*-*-c-iso8859-1")
         ("10" "-**-*-13-*-*-*-c-iso8859-1")
         ("11" "-**-*-15-*-*-*-c-iso8859-1")))))

Previous: , Up: Fonts and text translation   [Contents][Index]

5.5 How can I control CR/LF translation?

There are a number of methods by which you can control automatic CR/LF translation in Emacs, a situation that reflects the fact that the default support was not very robust in the past. For a discussion of this issue, take a look at this collection of email messages on the topic.

Next: , Up: Line ends   [Contents][Index]

5.5.1 Automatic CR/LF translation

For existing files, Emacs scans the file to determine the line ending convention as part of the same scan it does to determine the file encoding. Embedded Ctrl-M (ASCII 13) characters and inconsistent line ends can confuse the automatic scanning, and Emacs will present the file in Unix (LF) mode with the Ctrl-M characters displayed as ‘^M’. It does this to be safe, as no data loss will occur if the file is really binary and the Ctrl-M characters are significant.

Previous: , Up: Line ends   [Contents][Index]

5.5.2 CR/LF translation by file system

The variable untranslated-filesystem-list defines whole directory trees that should not have CR/LF autodetection performed on them. The list can be manipulated with the functions add-untranslated-filesystem and remove-untranslated-filesystem. With auto-detection in recent versions of Emacs, this is seldom useful for existing files, but can still be used to influence the choice of line ends for newly created files.

Next: , Previous: , Up: Top   [Contents][Index]

6 Printing

A lot of effort has gone into making it easier to print from Emacs on MS Windows, but this has still been insufficient to keep up with changes in printing technology from text and postscript based printers connected via ports that can be accessed directly, to graphical printers that are only accessible via USB. For details, see Emacs Wiki,, and

Next: , Previous: , Up: Top   [Contents][Index]

7 Subprocesses

Next: , Up: Sub-processes   [Contents][Index]

7.1 Quoting issues

The quoting rules for native Windows shells and Cygwin shells have some subtle differences. When Emacs spawns subprocesses, it tries to determine whether the process is a Cygwin program and changes its quoting mechanism appropriately.

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.2 Programs reading input hang

Programs that explicitly use a handle to the console (CON or CON:) instead of stdin and stdout cannot be used as subprocesses to Emacs, and they will also not work in shell-mode. The default ftp client on Windows is an example of such a program - this ftp program is mostly fine for use with ange-ftp or tramp, but not for M-x ftp (see How do I use FTP within Emacs). There is no convenient way for either Emacs or any shell used in shell-mode to redirect the input and output of such processes from the console to input and output pipes. The only workaround is to use a different implementation of the program that does not use the console directly. Microsoft’s new PowerShell appears to be another such program, so that cannot be used as a replacement shell for Emacs.

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.3 Buffering in shells and subprocesses

You may notice that some programs, when run in a shell in shell-mode, have their output buffered (e.g., people have found this happening to them with sql-mode). When the program has a lot of output, it overflows the buffering and gets printed to the shell buffer; however, if the program only outputs a small amount of text, it will remain buffered and won’t appear in the shell buffer. The same can happen in other subprocesses that themselves run other programs as subprocesses, for example when using cvs from Emacs, which is itself configured to use ssh, password prompts fail to appear when expected, and cvs appears to hang.

Although it may at first seem like the shell is buffering the output from the program, it is actually the program that is buffering output. The C runtime typically decides how to buffer output based upon whether stdout is bound to a handle to a console window or not. If bound to a console window, output is buffered line by line; if bound to a block device, such as a file, output is buffered block by block.

In a shell buffer, stdout is a pipe handle and so is buffered in blocks. If you would like the buffering behavior of your program to behave differently, the program itself is going to have to be changed; you can use setbuf and setvbuf to manipulate the buffering semantics.

Some programs handle this by having an explicit flag to control their buffering behavior, typically -i for interactive, or by a special environment variable. Other programs manage to detect that they are running under Emacs, by using ‘getenv("emacs")’ internally. Look in the program’s documentation for the way around this issue.

Up: Subprocess buffering   [Contents][Index]

7.3.1 Perl script buffering

A handy solution for Perl scripts to the above problem is to use:

# Turn all buffering off.
select((select(STDOUT), $| = 1)[0]);
select((select(STDERR), $| = 1)[0]);
select((select(STDIN), $| = 1)[0]);

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.4 16-bit subprocesses accessing the floppy drive

If you are finding the 16 bit DOS subprocesses cause your A: drive to be accessed, hanging Emacs until the read times out if there is no floppy in the drive, check to see if your virus software is causing the problem.

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.5 Killing subprocesses on Windows 95/98/Me

Emacs cannot guarantee that a subprocess gets killed on Windows 95 and its descendants, and it is a difficult limitation to work around. To avoid problems on these systems, you should let subprocesses run to completion including explicitly exiting shells before killing the associated buffer.

If you find that while shutting down, Windows complains that there is a running cmdproxy.exe even though you carefully exited all shells and none were showing in Task Manager before the shutdown, this could be due to buggy interaction with your virus scanner.

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.6 Sending EOF to subprocesses

When an EOF is sent to a subprocess running in an interactive shell with process-send-eof, the shell terminates unexpectedly as if its input was closed. This affects the use of C-c C-d in shell buffers. See this discussion for more details.

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.7 How do I use a shell in Emacs?

You can start an interactive shell in Emacs by typing M-x shell. By default, this will start the standard Windows shell cmd.exe. Emacs uses the SHELL environment variable to determine which program to use as the shell. To instruct Emacs to use a non-default shell, you can either set this environment variable, or customize explicit-shell-file-name. You can also customize shell-file-name to change the shell that will be used by subprocesses that are started with shell-command and related non-interactive shell commands.

Up: Using shell   [Contents][Index]

7.7.1 bash

Cygwin bash is a popular shell for use with Emacs. To use bash as the default shell in Emacs, you can place the following in your init file:

(defun my-shell-setup ()
  "For Cygwin bash under Emacs 20"
  (setq comint-scroll-show-maximum-output 'this)
  (make-variable-buffer-local 'comint-completion-addsuffix))
  (setq comint-completion-addsuffix t)
  ;; (setq comint-process-echoes t) ;; reported that this is no longer needed
  (setq comint-eol-on-send t)
  (setq w32-quote-process-args ?\")

(add-hook 'shell-mode-hook 'my-shell-setup)

WARNING: Some versions of bash set and use the environment variable PID. For some as yet unknown reason, if PID is set and Emacs passes it on to bash subshells, bash dies (Emacs can inherit the PID variable if it’s started from a bash shell). If you clear the PID variable in your init file, you should be able to continue to use bash as your subshell:

    (setenv "PID" nil)

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.8 How do I use Cygwin style paths in Emacs?

The package cygwin-mount.el teaches Emacs about Cygwin mount points.

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.9 How do I make dired use my ls program?

Dired uses an internal lisp implementation of ls by default on Windows. For consistent display of symbolic links and other information with other programs (eg Cygwin) and performance reasons, you may want to use a Windows port of ls instead.

(setq ls-lisp-use-insert-directory-program t)      ;; use external ls
(setq insert-directory-program "c:/cygwin/bin/ls") ;; ls program name

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.10 How do I prevent shell commands from being echoed?

Some shells echo the commands that you send to them, and the echoed commands appear in the output buffer. In particular, the default shells, and cmd.exe, have this behavior.

To prevent echoed commands from being printed, you can place the following in your init file:

    (defun my-comint-init ()
      (setq comint-process-echoes t))
    (add-hook 'comint-mode-hook 'my-comint-init)

If shell-mode still is not stripping echoed commands, then you’ll have to explicitly tell the shell to not echo commands. You can do this by setting the explicit-SHELL-args variable appropriately; where SHELL is the value of your SHELL environment variable (do a M-: (getenv "SHELL") to see what it is currently set to). Assuming that you are on NT and that your SHELL environment variable is set to cmd.exe, then placing the following in your init file will tell cmd.exe to not echo commands:

    (setq explicit-cmd.exe-args '("/q"))

The comint package will use the value of this variable as an argument to cmd.exe every time it starts up a new shell; the /q is the argument to cmd.exe that stops the echoing (invoking ‘cmd /?’ in a shell will show you all of the command line arguments to cmd.exe).

Note that this variable is case sensitive; if the value of your SHELL environment variable is CMD.EXE instead, then this variable needs to be named explicit-CMD.EXE-args instead.

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.11 How can I make shell completion use forward slashes?

The character appended to directory names when completing in a shell buffer is controlled by the variable comint-completion-addsuffix. See its documentation (with C-h v) for details.

Next: , Previous: , Up: Sub-processes   [Contents][Index]

7.12 Why do I get incorrect DOS version messages?

This might happen if, for example, you invoke nmake in a shell and it tries to create sub-shells. The problem happens because when the shell is initially created, the first argument to the shell is not the directory in which the shell program resides. When this happens, fabricates a value for its COMSPEC environment variable that is incorrect. Then, when other programs go to use COMSPEC to find the shell, they are given the wrong value.

The fix for this is to either prevent any arguments from being sent to the shell when it starts up (in which case will use a default, and correct, value for COMSPEC), or to have the first argument be the directory in which the shell executable resides.

Previous: , Up: Sub-processes   [Contents][Index]

7.13 Why is nothing happening when I enter shell commands?

Some anti-virus software has been reported to cause problems with shells in the past. Try turning off options such as “Scan all files”. See What known problems are there with anti-virus software?.

Next: , Previous: , Up: Top   [Contents][Index]

8 Network access

Next: , Up: Network access   [Contents][Index]

8.1 How do I use mail in Emacs?

Emacs comes with several options for reading and writing mail. These are documented in the manual, and the choice of which method to use depends on personal taste. There are some issues specific to Windows however, related to the fact that Windows machines do not have the mail infrastructure that is commonly installed on other platforms, so mail will not work without some configuration.

Next: , Up: Mail   [Contents][Index]

8.1.1 Outgoing mail

For outgoing mail, you will need to use smtpmail.el which allows Emacs to talk directly to SMTP mail servers. This is included with Emacs, and can be set up as follows:

(setq user-full-name "Your full name")
(setq user-mail-address "Your@email.address")
(setq smtpmail-default-smtp-server "")

(setq send-mail-command 'smtpmail-send-it) ; For mail-mode (Rmail)
(setq message-send-mail-function 'smtpmail-send-it) ; For message-mode (Gnus)

Note that if you want to change the name of the SMTP server after smtpmail is loaded, then you’ll need to change smtpmail-smtp-server.

If you are experiencing problems with sending large messages, check the value of the variable smtpmail-debug-info. If it is non-nil, you should set it to nil:

Next: , Previous: , Up: Mail   [Contents][Index]

8.1.2 Incoming mail with Rmail and POP3

For incoming mail using the Rmail package and a POP3 server, you will need the following configuration:

(setenv "MAILHOST" "")
(setq rmail-primary-inbox-list '("po:your logon id"))
(setq rmail-pop-password-required t)

Next: , Previous: , Up: Mail   [Contents][Index]

8.1.3 Incoming mail with Gnus

Although Gnus started life as a Usenet news reader, it also makes a good mail reader, particularly if you subscribe to a lot of mailing lists, or you want to use IMAP rather than POP3, which is not supported by Rmail. See The Gnus manual in The Gnus manual.

Previous: , Up: Mail   [Contents][Index]

8.1.4 Other incoming mail options

Other options for reading mail in Emacs include VM, MH-E and Wanderlust. MH-E is included with Emacs. The others require lisp or executable code that does not come with Emacs, so you should seek help where you obtained the packages from if you want to use them.

Next: , Previous: , Up: Network access   [Contents][Index]

8.2 How do I open attachments in Gnus?

In your HOME directory create a file called .mailcap, with contents like the following:

application/zip "C:/Program Files/7-Zip/7zFM.exe"
video/* "C:/Program Files/VideoLAN/VLC/vlc.exe"

Warning: Associating MIME types with start or other generic Windows commands to open arbitrary files might seem like a good idea, but it leaves your system as open to attack as Outlook Express was at its worst. Especially dangerous is associating application/* or */* in this way.

Next: , Previous: , Up: Network access   [Contents][Index]

8.3 How do I use FTP within Emacs?

Windows built in FTP client can be used with ange-ftp. Ange-ftp is the Emacs package that provides FTP connectivity to tramp, a multi-protocol remote file access package for Emacs that is enabled by default.

The Windows FTP client does have problems with some firewalls, due to lack of passive mode support, so you may want to try an alternative ftp client instead. Make sure that the client you are trying is in your PATH before the default Windows client, or rename the default Windows client to avoid it getting in the way. Alternatively you can customize ange-ftp-ftp-program-name to the full path to the version you are trying. See Other useful ports.

Next: , Previous: , Up: Network access   [Contents][Index]

8.4 How do I use Tramp to work in Emacs via SSH?

Tramp can use a number of protocols to connect to remote machines to read files and even run commands on those files remotely. A popular one is ssh. As well as Cygwin versions of openssh, you can use PuTTY’s command line plink program as the ssh client. The relevant methods to use in tramp-default-method or tramp-default-method-alist for these options are:

Previous: , Up: Network access   [Contents][Index]

8.5 How do I use telnet with Emacs?

To use telnet-mode on Windows, you need a telnet client that uses stdin and stdout for input and output. The default Windows client is a Windows application, and will not work as a subprocess. Several options exist, but information that was formerly in this FAQ is out of date now, so no concrete pointers are available.

Next: , Previous: , Up: Top   [Contents][Index]

9 Text and Utility modes

Next: , Up: Text and Utility modes   [Contents][Index]

9.1 How do I use TeX with Emacs?

You will need an implementation of TeX for Windows. A number of implementations are listed on the TeX Users Group website.

Up: TeX   [Contents][Index]

9.1.1 AUCTeX

AUCTeX is an Emacs package for writing LaTeX files, which also includes preview-latex, an Emacs mode for previewing the formatted contents of LaTeX documents. Pre-compiled versions for Windows are available from the AUCTeX site.

Next: , Previous: , Up: Text and Utility modes   [Contents][Index]

9.2 How do I perform spell checks?

Emacs has support for spell checking on demand (ispell) and as your type (flyspell). Both packages depend on a copy of ispell 3.2 or a compatible spell-checking program. GNU Aspell is a popular choice these days, Windows installers are available from the official site. Another possibility is Hunspell, which is available from the ezwinports site.

Once installed, you will need to configure ispell-program-name to tell ispell and flyspell to use aspell or hunspell as a replacement for ispell. You can include the full path to the aspell/hunspell binary, which means you do not need to add its installation directory to the PATH.

Next: , Previous: , Up: Text and Utility modes   [Contents][Index]

9.3 Emacs and encryption

GNU Privacy Guard is a Free replacement for PGP, with Windows binaries available. See

Next: , Previous: , Up: Text and Utility modes   [Contents][Index]

9.4 Why doesn’t my wheel mouse work in Emacs?

Some wheel mice ship with default settings that do not send the standard wheel events to programs, but instead try to simulate scroll bar events. Usually this is configurable from the hardware specific pages on the mouse control panel. The middle button is often mapped in the same settings to have some functionality other than sending middle mouse button events. In some cases, uninstalling the manufacturer’s drivers and telling Windows to use the generic USB or PS/2 drivers is the only way to make the mouse work properly.

Previous: , Up: Text and Utility modes   [Contents][Index]

9.5 How do I use grep with Emacs?

The best way to use M-x grep with Emacs is to download a port of GNU grep. See Other useful ports.

If you want a quick solution without installing extra tools, a poor substitute that works for simple text searches is to specify the built in Windows command findstr as the command to run at the M-x grep prompt. Normally you will want to use the /n argument to findstr.

Up: Grep   [Contents][Index]

9.5.1 How do I do a recursive grep?

The Emacs commands rgrep, grep-find and find-grep-dired are all different interfaces for grepping recursively into subdirectories. By default, they use the command find to determine which files to work on, and either run grep directly from find, or use xargs to batch up files and reduce the number of invocations of grep.

Windows also comes with a find command, but it is not in any way compatible with the POSIX find that Emacs tries to use. Emacs expects a find compatible with GNU findutils. See Other useful ports. After you have installed it, you will need to make sure that Emacs finds this version, not the standard Windows find command. You can do this by either renaming the Windows command, changing your PATH to ensure that the directory containing the findutils bin directory comes before the Windows system directory, or set the variable find-program to the full path to the findutils find command.

An alternative if you have a recent version of grep is to customize grep-find-command to use ‘grep -r’ instead of both find and grep. Another alternative if you don’t need the full capabilities of grep is to use ‘findstr /n /r’.

Next: , Previous: , Up: Top   [Contents][Index]

10 Developing with Emacs

We recommend using the GNU Compiler Collection for developing C/C++ code from Emacs. The MinGW development toolchain provides Windows ports of GCC and other compilers.

The rest of this chapter describes other alternatives which you may need to use.

Next: , Up: Developing with Emacs   [Contents][Index]

10.1 How do I use Emacs with Microsoft Visual C++

There are two ways you can use Emacs in conjunction with MSVC. You can use Emacs as the editor, and do everything else in the DevStudio IDE. Or you can use Emacs as an IDE, calling the MSVC command line tools to build your project.

Next: , Up: MSVC   [Contents][Index]

10.1.1 Emacs as the text editor for DevStudio

Christopher Payne wrote a Visual Studio add-in that makes Emacs the default text editor, this has now been taken over by Jeff Paquette. See the following two URLs for details:

Previous: , Up: MSVC   [Contents][Index]

10.1.2 Using MSVC command line tools from Emacs

This is an app note on how to use Microsoft Visual C++ with Emacs. The experiments done below were done with Emacs 19.34.1 on Windows 95, using Visual C++ 4.0 Standard Edition. Your mileage may vary.

This writeup assumes minimal knowledge of Emacs hacking on the part of the reader.

Next: , Up: MSVC command line   [Contents][Index] VC++ Environment Variables

There is a batch file in your VC++ installation’s bin directory called vcvars32.bat, which sets up the environment variables needed to run the VC++ command line tools. Arrange for those same environment variables to be set in your Emacs session. You can do this on Windows 9x by calling the vcvars32.bat script from autoexec.bat. On other versions of Windows you can set the environment variables globally using the System control panel.

For all versions of Windows you can alternatively set the variables just inside Emacs by using setenv calls in your init file. See Where do I put my init file?.

You should now be able to compile from Emacs. Load a source file from a VC++ project. Type M-x compile. Replace the proposed command line with:

nmake -f ProjectName.mak

You will find that this defaults to a debug build. You can change it to a release build with:

nmake -f ProjectName.mak CFG="ProjectName - Win32 Release"

Next: , Previous: , Up: MSVC command line   [Contents][Index] Setting the default compile command

Now set the default value for the compile command line. Add the following to your init file:

;; Set up for Visual C++ compiling
(setq compile-command "nmake -f ")

If you work on the same project long term, you can add the project makefile to the string.

David Biesack suggests that perhaps it’s easy to write a Makefile in the project directory which does

all: debug
debug: FORCE
        nmake /f $(PROJECT).mak CFG="$(PROJECT) - Win32 Debug"
release: FORCE
        nmake /f $(PROJECT).mak CFG="$(PROJECT) - Win32 Release"

and then you can simply change compile-command to nmake.

Caleb T. Deupree reports that on VC++ 5.0 and up, "You can also set an option in Options/Build to export a makefile every time the project is saved, which you can then use to compile with ‘nmake -f project.mak’." VC++ 4.0 builds the make file every time, and there is no option.

Next: , Previous: , Up: MSVC command line   [Contents][Index] Reverting Buffers

It is recommended that you use auto-revert-mode in buffers that you have open in both Emacs and MSVC++ at the same time. Then if you mistakenly edit the file in MSVC++, Emacs will pick up your changes immediately, rather than after you have written lots more code and attempt to save.

Previous: , Up: MSVC command line   [Contents][Index] Edit with Emacs function for MSVC

You can also set up VC++ to import a file into Emacs for you, all ready for editing. In VC++, go to the Tools pull-down menu, and click on Customize.... In the Tools tab, click on Add. Use Browse to locate the emacsclientw.exe file in your Emacs bin directory, and select it. For arguments, use +$(CurLine) "$(FilePath)" and for the directory use the $(WkspDir) (the quotes around FilePath handle paths with spaces in them). Set the Menu Text to say "Em&acs". The +$(CurLine) will set point in Emacs to the same line as the cursor position in VC++. The ampersand in the word Em&acs allows you to select emacs from the keyboard. (E is already used for the OLE control test container.)

You should now be able to go to any source file in your project. Then, use the pull-down menu Tools->Emacs. The active file in your VC++ IDE should now be front and center in Emacs, all ready to edit as you wish. If you use keystrokes to work the menus, try Alt-T A to move the file into Emacs. Binding this tool to a keystroke will be left as an exercise for the student.

If you have the option of saving files before running tools, make sure this option is set. (I don’t see it on VC++ 4.0.)

Next: , Previous: , Up: Developing with Emacs   [Contents][Index]

10.2 Emacs and Borland C++ Builder

Jonathan Arnold has written an EmacsEdit “expert” for interfacing C++ Builder and Emacs.

Next: , Previous: , Up: Developing with Emacs   [Contents][Index]

10.3 Is there a version of my VC software I can use with Emacs?

If you are using a graphical revision control tool already, check if it comes with command-line tools. Many such GUI tools are just wrappers for the same command line tools that Emacs requires for its VC integration. Most of the supported VC systems have well supported Free native Windows binaries. For those that don’t Cygwin may be an option. See Other useful ports.

Previous: , Up: Developing with Emacs   [Contents][Index]

10.4 How do I use the Perl debugger with Emacs?

From Jay Rogers:

Some versions of the perl debugger itself need to be patched to work with emacs. They are perl versions 5.001 and less, and version 5.004_01. To fix, locate and change the code similar to the following code in lib/

        if (-e "/dev/tty") {
            $console = "/dev/tty";
        elsif (-e "con") {
            $console = "";                 <---- change "con" to ""
        else {
            $console = "sys\$command";

Doug Campbell also has some suggestions for improving the interaction of perldb and Emacs.

Next: , Previous: , Up: Top   [Contents][Index]

11 Other useful ports

Next: , Up: Other useful ports   [Contents][Index]

11.1 Cygwin

Cygwin is a popular complete POSIX emulation environment for Windows. Most of its tools can be used with Emacs, and it covers a wide range of ported software. The main shell used by Cygwin is GNU bash, but other shells are also available. Some Cygwin tools may not interoperate well with Emacs or other native Windows tools, due to the total immersion aspect of Cygwin, including its non-native filesystem mapping.

If you choose to use Cygwin, then its tools will probably be all that you need, but you will need to get image libraries from elsewhere, as the Cygwin ones are not compatible with non-Cygwin software. In fact, if Cygwin is on your PATH when you run Emacs, and Emacs does not find other versions of the image libraries first, then the Cygwin ones can cause problems. Cygwin developers recommend that you do not put Cygwin on your system PATH for this reason. Instead you can make the Cygwin tools available within Emacs by setting exec-path in your init file.

Next: , Previous: , Up: Other useful ports   [Contents][Index]

11.2 MinGW and MSYS

MinGW is a set of development tools that produce native Windows executables, not dependent on Cygwin’s POSIX emulation DLLs.

MSYS is a POSIX shell and minimal set of tools that are commonly used in configure scripts. Like Cygwin, this environment uses a non-native filesystem mapping to appear more POSIX like to the scripts that it runs. This is intended to complement the MinGW tools to make it easier to port software to Windows.

Next: , Previous: , Up: Other useful ports   [Contents][Index]

11.3 EZWinPorts

The EZWinPorts project provides many useful ports of recent versions of GNU and Unix software. This includes all the optional libraries used by Emacs (image libraries, libxml2, GnuTLS), RCS, Texinfo, a clone of man command, Grep, xz, bzip2, bsdtar, ID Utils, Findutils, Hunspell, Gawk, GNU Make, Groff, GDB.

Next: , Previous: , Up: Other useful ports   [Contents][Index]

11.4 UWIN

UWIN is another POSIX emulation environment, like Cygwin and MSYS, that provides a large number of ported tools. The shell used by UWIN is ksh, the Korn shell.

Next: , Previous: , Up: Other useful ports   [Contents][Index]

11.5 GnuWin32

GnuWin32 provides precompiled native Windows ports of a wide selection of Free software and libraries. Unfortunately, the ports are outdated. Tools available here that are useful for Emacs include:

Next: , Previous: , Up: Other useful ports   [Contents][Index]

11.6 GTK

GTK is a potential source for some of the image libraries that Emacs requires. GTK is installed along with other ports of GUI software, such as the GIMP image editor, and Pidgin instant messenger client. If GTK is installed when you run addpm, Emacs will use the image libraries that it provides, even if they are not on the PATH. GTK ships with JPEG, PNG and TIFF support.

Previous: , Up: Other useful ports   [Contents][Index]

11.7 How do I read man pages?

Man pages for Emacs and other ported programs that you have can be read using Emacs’ built-in manual reader woman. This requires no external programs, but if you do have a port of man, there is also an Emacs wrapper man that which may be slightly faster. A Windows version of man is available from the EZWinPorts site (see EZWinPorts).

Next: , Previous: , Up: Top   [Contents][Index]

12 Further information

Next: , Up: Further information   [Contents][Index]

12.1 Where can I get more information about Emacs?

If you have general questions about Emacs, the best places to start looking are The GNU Emacs Manual, and the standard Emacs FAQ. In Emacs, you can browse the manual using Info by typing C-h r, and you can view the FAQ by typing C-h C-f. Other resources include:

Previous: , Up: Further information   [Contents][Index]

12.2 What mailing lists are there for discussing Emacs on Windows?

The official mailing list for Windows specific help and discussion is help-emacs-windows. See that link for information on how to subscribe or unsubscribe. The list archives are available online.

Previous: , Up: Top   [Contents][Index]


Function and Variable Index

Jump to:   A   C   E   F   G   I   L   M   P   R   S   T   U   W   X  
Index Entry  Section

add-untranslated-filesystem: Line ends by file system
ange-ftp-ftp-program-name: Using FTP
auto-revert-mode: Reverting buffers

comint-completion-addsuffix: Bash
comint-completion-addsuffix: Shell completion forward slash
comint-eol-on-send: Bash
comint-mode-hook: Shell echo
comint-process-echoes: Shell echo
comint-scroll-show-maximum-output: Bash
compile: MSVC command line
compile-command: Default compile command
create-fontset-from-ascii-font: Non-latin display
create-fontset-from-fontset-spec: Non-latin display
cua-mode: CUA

exec-path: Cygwin
explicit-bash-args: Shell echo
explicit-bash.exe-args: Shell echo
explicit-cmd.exe-args: Shell echo
explicit-cmdproxy.exe-args: Shell echo
explicit-shell-file-name: Using shell

find-grep-dired: Recursive grep
find-program: Recursive grep
flyspell-mode: Spell check
focus-follows-mouse: Focus follows mouse
ftp: Subprocess hang

global-auto-revert-mode: Reverting buffers
grep: Grep
grep-find: Recursive grep
grep-find-command: Recursive grep

insert-directory-program: Dired ls
ispell-program-name: Spell check

locale-coding-system: Localized fonts
ls-lisp-use-insert-directory-program: Dired ls

man: Read man pages
message-send-mail-function: Outgoing mail

process-send-eof: Subprocess EOF

remove-untranslated-filesystem: Line ends by file system
rgrep: Recursive grep
rmail-pop-password-required: Incoming mail with Rmail
rmail-primary-inbox-list: Incoming mail with Rmail

send-mail-command: Outgoing mail
server-start: Associate files with Emacs
set-face-font: Bold and italic
set-message-beep: Beep sound
set-selection-coding-system: Garbled clipboard
shell: Using shell
shell-command: Using shell
shell-file-name: Using shell
shell-mode: Subprocess buffering
shell-mode-hook: Bash
smtpmail-debug-info: Outgoing mail
smtpmail-default-smtp-server: Outgoing mail
smtpmail-send-it: Outgoing mail
smtpmail-smtp-server: Outgoing mail
sql-mode: Subprocess buffering

telnet: telnet
tramp-default-method: Tramp ssh
tramp-default-method-alist: Tramp ssh

untranslated-filesystem-list: Line ends by file system
user-full-name: Outgoing mail
user-mail-address: Outgoing mail

w32-enable-synthesized-fonts: Bold and italic
w32-enable-unicode-output: Third-party multibyte
w32-fixed-font-alist: Add fonts to menu
w32-mouse-button-tolerance: Mouse trouble
w32-num-mouse-buttons: Mouse trouble
w32-quote-process-args: Bash
w32-select-font: Font names
w32-swap-mouse-buttons: Mouse trouble
w32-use-full-screen-buffer: Console window size
w32-use-w32-font-dialog: Font menu
woman: Read man pages

x-list-fonts: Font names

Jump to:   A   C   E   F   G   I   L   M   P   R   S   T   U   W   X  

Concept Index

Jump to:   -   .   2   8   _  
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Z  
Index Entry  Section

-nw, window size: Console window size

.emacs: Init file
.emacs.d: Location of init file
.mailcap: Attachments with Gnus

2 button mouse: Mouse trouble

8.3 filenames, problems caused: Does not run

_emacs: Location of init file

addpm: Installing binaries
addpm, using GTK image libraries: GTK
alt key, using windows keys as additional: Swap CapsLock and Control
ALTERNATE_EDITOR: Associate files with Emacs
ange-ftp: Using FTP
anti-virus software reporting a virus in Emacs: Virus
anti-virus software, bad interaction with: Anti-virus
anti-virus software, bad interaction with: Shell commands do nothing
arch, version control integration with Emacs: Version control
aspell: Spell check
associating files with Emacs: Associate files with Emacs
attachments, in gnus: Attachments with Gnus
auctex, precompiled for Windows: AUCTeX
auto protect, anti-virus option causing problems: Anti-virus
auto protect, anti-virus option causing problems: Shell commands do nothing

bash, using cygwin shell within Emacs: Bash
beep, changing the sound: Beep sound
binary files, determining by filesystem: Line ends by file system
black and white images, getting color images in Emacs: Image support
bold fonts, synthesized: Bold and italic
Borland C++, integration with Emacs: Borland C++ Builder
bugs in Emacs, how to debug: Debugging
bzr, version control integration with Emacs: Version control

C-c to copy: CUA
C-v to paste: CUA
C-x to cut: CUA
caps-lock, swapping with control key: Swap CapsLock and Control
checking that HOME is set correctly: Troubleshooting init file
clean Emacs registry settings: Uninstall
clipboard encoding: Garbled clipboard
clipboard, corruption of: Garbled clipboard
clipboard, NUL characters: Cut and paste NUL
color images, installing support for images in Emacs: Image support
compile, setting default command: Default compile command
compiling Emacs: Compiling
completion, using forward slashes in shell buffers: Shell completion forward slash
COMSPEC, effect on subprocesses of subprocesses: Incorrect DOS version
console, window size: Console window size
control key, swapping with caps-lock: Swap CapsLock and Control
copy with C-c: CUA
CUA keybindings: CUA
cut with C-x: CUA
cvs hanging when login needed: Subprocess buffering
cvs, version control integration with Emacs: Version control
cygwin bash as shell within Emacs: Bash
cygwin environment: Cygwin
cygwin mount points, using within Emacs: Cygwin paths
cygwin paths, using within Emacs: Cygwin paths
cygwin symlinks in dired: Dired ls
cygwin, library conflicts: Cygwin
cygwin, quoting arguments: Quoting issues

debugging Emacs: Debugging
debugging Emacs with GDB: Debugging
debugging init problems: Troubleshooting init file
delete Emacs directory: Uninstall
delete-selection-mode: Highlight selection
Desktop, finding where it is: Find-file and the Desktop
DevStudio, keeping source in sync: Reverting buffers
DevStudio, load in Emacs command: Edit MSVC
DevStudio, using Emacs as editor in: DevStudio
dired, interpreting symlinks the same way as cygwin: Dired ls
dired, using an external ls program: Dired ls
DOS line ends: Line ends
DOS port: Other versions of Emacs

echo, suppressing for shell input: Shell echo
Emacs debugging: Debugging
Emacs Development: Downloading
Emacs distribution, checking digital signatures: Encryption
Emacs source code: Downloading
emacsclient, associating files with: Associate files with Emacs
emacsclient, calling from Visual Studio: Edit MSVC
encoding, clipboard: Garbled clipboard
encryption: Encryption
EOF, sending to subprocesses: Subprocess EOF
exchange mouse-2 and mouse-3 buttons: Mouse trouble
Explorer, associating Emacs with files in: Associate files with Emacs
extracting Emacs distribution: Unpacking
ezwinports: EZWinPorts

failure to run, Emacs: Does not run
faqs, general: More information
faqs, old: More information
file associations: Associate files with Emacs
find, the POSIX command: Recursive grep
find, using with grep: Recursive grep
finding the Desktop: Find-file and the Desktop
findstr: Grep
findstr, recursive: Recursive grep
firewall, bad interaction with: Anti-virus
firewall, bad interaction with: Shell commands do nothing
floppy drive, access when subprocesses started: Subprocesses and floppy drive
flyspell: Spell check
font dialog, using a menu instead: Font menu
font dialog, using to find font names: Font names
font menu, adding fonts: Add fonts to menu
font XLFD name format: Font names
fontconfig font names in Emacs 23: Font names
fonts, displaying a menu: Font menu
fonts, localized font names: Localized fonts
fonts, where to find: International fonts
fontsets, defining: Non-latin display
fontsets, displaying a menu: Font menu
forward slashes for completion in shell buffers: Shell completion forward slash
ftp, client hanging: Subprocess hang
ftp, using within Emacs: Using FTP
full-screen console programs, as subprocesses: Subprocess hang

garbage on the clipboard: Garbled clipboard
getting Emacs: Downloading
gif, installing image support in Emacs: Image support
git, version control integration with Emacs: Version control
GNU intlfonts, for displaying all languages: Language display
GNU intlfonts, where to get: International fonts
gnus, attachments: Attachments with Gnus
gnus, mail and news client: Incoming mail with Gnus
gnuwin32 tools: GnuWin32
gpg, Windows binaries: Encryption
grep: Grep
grep, recursive through subdirectories: Recursive grep
GTK image libraries: GTK

HELLO file, displaying all: Language display
help, mailing lists: Mailing lists
help, manuals and other sources: More information
hg, version control integration with Emacs: Version control
highlighting the selected region: Highlight selection
HOME directory: Location of init file

image libraries, development: GnuWin32
image libraries, gnuwin32: GnuWin32
image libraries, GTK: GTK
images, installing libraries for: Image support
imap, using Gnus: Incoming mail with Gnus
init file: Init file
init.el: Location of init file
installing Emacs: Installing binaries
interactive shell, using: Using shell
Internet Explorer, view source in Emacs: Using with Explorer
interoperability with cygwin: Cygwin
intlfonts, for displaying all languages: Language display
intlfonts, where to get: International fonts
ispell: Spell check
italic fonts: Bold and italic

jpeg, installing image support in Emacs: Image support

key layout, customizing: Swap CapsLock and Control
killing subprocesses, Windows 95/98/ME: Killing subprocesses

language support, finding fonts: International fonts
language support, fonts: Language display
language support, forcing Emacs to use specific fonts: Non-latin display
language support, third party programs on Windows 9x/ME: Third-party multibyte
latest development version of Emacs: Downloading
latex: AUCTeX
library conflicts with cygwin: Cygwin
line ends, automatic detection: Automatic line ends
line ends, determining by filesystem: Line ends by file system
locating files on the Desktop: Find-file and the Desktop

Mac line ends: Line ends
mail, attachments in gnus: Attachments with Gnus
mail, incoming with Gnus: Incoming mail with Gnus
mail, incoming with rmail: Incoming mail with Rmail
mail, other options: Incoming mail other
mail, outgoing: Outgoing mail
MAILHOST: Incoming mail with Rmail
mailing lists: Mailing lists
mailto urls, associating with Emacs: Using with Explorer
man pages: Read man pages
manuals: More information
marked region, highlighting: Highlight selection
maximize frames from lisp: Window operations
mcvs, version control integration with Emacs: Version control
mercurial, version control integration with Emacs: Version control
mh-e, mail client: Incoming mail other
middle button, on wheel mouse: Mouse wheel
middle mouse button, simulating: Mouse trouble
MIME, configuration for Gnus: Attachments with Gnus
mingw tools: MinGW
minimize frames from lisp: Window operations
monochrome images, getting color images in Emacs: Image support
monotone, version control integration with Emacs: Version control
mount points, cygwin: Cygwin paths
mouse buttons, problems with: Mouse trouble
mouse over to focus: Focus follows mouse
mouse wheel: Mouse wheel
movemail, using pop3: Incoming mail with Rmail
MSVC++, compiling within Emacs: MSVC command line
MSVC++, environment variables: VC++ environment
MSVC++, keeping source in sync: Reverting buffers
MSVC++, load in Emacs command: Edit MSVC
MSVC++, using Emacs as editor with: DevStudio
msys environment: MinGW
MULE, finding fonts: International fonts
MULE, fonts: Multilingual fonts
MULE, fontsets: Non-latin display
multilingual display, finding fonts: International fonts
multilingual display, fonts: Multilingual fonts
multilingual display, fontsets: Non-latin display
multilingual display, third party programs on Windows 9x/ME: Third-party multibyte

news urls, associating with Emacs: Using with Explorer
nmake, as default compile command: Default compile command
nmake, Incorrect DOS version messages: Incorrect DOS version

openssh: Tramp ssh
other ports of Emacs: Other versions of Emacs
other sources of information: More information
output not displaying, subprocesses: Subprocess buffering
overwriting the selected region: Highlight selection

paste with C-v: CUA
perl, avoiding buffering when used as a subprocess of Emacs: Perl script buffering
perl, debugging within Emacs: Perldb
perldb, using with Emacs: Perldb
pgp encryption, with GNU Privacy Guard: Encryption
plink: Tramp ssh
png, installing image support in Emacs: Image support
point and mark, highlighting the region between: Highlight selection
point to focus: Focus follows mouse
pop3, using Gnus: Incoming mail with Gnus
pop3, using rmail: Incoming mail with Rmail
precompiled binaries: Downloading
preview-latex: AUCTeX
printing: Printing
PuTTY: Tramp ssh

quoting arguments to subprocesses: Quoting issues

rcs, version control integration with Emacs: Version control
recursive searching with grep: Recursive grep
region, highlighting: Highlight selection
registry, cleaning the Emacs settings: Uninstall
registry, setting the HOME directory in: Location of init file
remote hosts via ftp: Using FTP
remote hosts via ssh: Tramp ssh
remove Emacs: Uninstall
revision control, integration with Emacs: Version control
rmail, mail client: Incoming mail with Rmail
rsvg, installing image support in Emacs: Image support

scan all files, anti-virus option causing problems: Anti-virus
scan all files, anti-virus option causing problems: Shell commands do nothing
scan codes, modifying: Swap CapsLock and Control
scope of FAQ: Introduction
scrolling, with mouse wheel: Mouse wheel
searching through files with grep: Grep
selection, highlighting: Highlight selection
setbuf, using in subprocesses to prevent buffering: Subprocess buffering
setvbuf, using in subprocesses to prevent buffering: Subprocess buffering
shell commands not working: Shell commands do nothing
shell commands, suppressing echo: Shell echo
shell specific arguments: Shell echo
shell terminates when EOF sent to subprocess: Subprocess EOF
shell within emacs, using: Using shell
shell, Incorrect DOS version messages: Incorrect DOS version
shell, interacting badly with anti-virus: Anti-virus
shell, interacting badly with anti-virus: Shell commands do nothing
shell, using cygwin bash within Emacs: Bash
shift key, selecting with: CUA
shutdown, complaints about cmdproxy.exe running: Killing subprocesses
signatures on Emacs distribution, checking: Encryption
simulating three button mouse with two buttons: Mouse trouble
smtp server: Outgoing mail
sound, changing the beep: Beep sound
source control, integration with Emacs: Version control
source for Emacs: Downloading
spell checking: Spell check
SQL subprocess hanging: Subprocess buffering
ssh, accessing remote hosts within Emacs: Tramp ssh
ssh, password prompt not appearing when using with cvs: Subprocess buffering
standard Windows keybindings: CUA
Start Menu, creating icons for Emacs: Installing binaries
Start Menu, removing Emacs from: Uninstall
sub-processes, quoting arguments to: Quoting issues
subprocess starting causes floppy drive access: Subprocesses and floppy drive
subprocess, killing on Windows 95/98/ME: Killing subprocesses
subprocesses: Sub-processes
subprocesses, buffering output: Subprocess buffering
subprocesses, cygwin tools: Cygwin
subprocesses, gnuwin32: GnuWin32
subprocesses, hanging when reading input: Subprocess hang
subprocesses, interacting badly with anti-virus: Anti-virus
subprocesses, mingw and msys: MinGW
subprocesses, useful tools: Other useful ports
subprocesses, uwin: UWIN
supported versions of Windows: Which versions of Windows
svn, version control integration with Emacs: Version control
swap right and middle mouse buttons: Mouse trouble
symlinks in dired, interpreting the same way as cygwin: Dired ls
synthesized italic and bold fonts: Bold and italic
system menu, simulating from lisp: Window operations

tar.gz files, how to unpack Emacs sources: Unpacking
telnet client, that works with Emacs: telnet
telnet, display size problems running emacs over: Console window size
telnet, in Emacs: telnet
tex: TeX
third mouse button, simulating: Mouse trouble
tiff, installing image support in Emacs: Image support
toolbar, installing color icons in: Image support
tramp, ftp: Using FTP
tramp, ssh: Tramp ssh
transient-mark-mode: Highlight selection
troubleshooting init problems: Troubleshooting init file
troubleshooting installation problems: Does not run
two button mouse: Mouse trouble
typesetting: TeX

UI, making Emacs more like other Windows apps: Make Emacs like a Windows app
uninstall Emacs: Uninstall
Unix line ends: Line ends
unpacking Emacs distribution: Unpacking
untarring Emacs distribution: Unpacking
unzipping Emacs distribution: Unpacking
upgrading Emacs: Uninstall
URLs, associating mail and news URLs with Emacs: Using with Explorer
useful tools: Other useful ports
uwin environment: UWIN

vcvars32.bat: VC++ environment
version control, integration with Emacs: Version control
virus reported in Emacs: Virus
virus software, bad interaction with: Anti-virus
virus software, bad interaction with: Shell commands do nothing
VisEmacs, add in for MS Developer Studio: DevStudio
Visual Studio, keeping source in sync: Reverting buffers
Visual Studio, load in Emacs command: Edit MSVC
Visual Studio, using Emacs as editor in: DevStudio
vm, mail client: Incoming mail other

wanderlust, mail and news client: Incoming mail other
wheel mouse: Mouse wheel
where to get Emacs binaries: Downloading
where to get sources: Downloading
Why Windows: Why Emacs on Windows
wiki: More information
window not appearing, Emacs: Does not run
Windows 3.11 port: Other versions of Emacs
windows key, use as alt: Swap CapsLock and Control
Windows, making Emacs act more like: Make Emacs like a Windows app
Windows, versions: Which versions of Windows
WM_SYSCOMMAND, sending system commands from lisp: Window operations

X, making Windows behave like: Make Windows more like X
XLFD font names: Font names
xpm, installing image support in Emacs: Image support

zip files, how to unpack Emacs binaries: Unpacking

Jump to:   -   .   2   8   _  
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Z  



Latest versions of GDB might refuse to load the init file for security reasons, unless you customize GDB; alternatively, use an explicit source ./gdbinit command after entering GDB.