Emacs Client / Server for Windows NT

This package provides a replacement for the emacsclient and emacsserver programs for use on Windows NT (including XP and 2000 etc). It works by using NT's named pipes instead of Unix domain sockets which are used in the original Unix version.

Download

Download version 0.1 (first release) from here.

Installation

The programs are drop-in replacements for the client and server executables so you do not need to re-compile Emacs or edit any Lisp source. If you have installed the official Windows Emacs binaries (eg, those from ftp://ftp.gnu.org/pub/gnu/emacs/windows) you can simply copy emacsclient.exe and emacsserver.exe into the bin/ folder in the installation directory.

Please note that the programs will probably not work with Emacs 22 (which at the time of writing has not been released). Version 22 no longer runs a separate process to handle the server and creates the server socket in Lisp code.

To start the server, press M-x start-server <RET> in Emacs.

You may want to put (start-server) in your .emacs file to make this happen automatically every time you start Emacs.

You may also want to ensure the Emacs bin/ folder is in your path so that you can call emacsclient from the command line.

Usage

Once the server is started you can cause Emacs to edit a file by typing the following at a command prompt:

emacsclient <filename>

The program will then wait until you press C-x # in Emacs.

To edit a file without waiting, type:

emacsclient -n <filename>

If you also use Cygwin you may want to use the included edit.sh script. This script accepts the filenames as Cygwin paths and converts them to Windows paths before passing them on to emacsclient. If emacsclient fails to find the pipe it will run emacs directly. To use with CVS or Subversion, put the following in your ~/.profile file:

export EDITOR=edit.sh

Why named pipes?

Another solution for using Emacs Server on Windows is to use the port of gnuserv. This opens a regular TCP server socket to accept connections. The advantages of using named pipes instead of TCP are: