This is gnuserv 3.11 for GNU Emacs, available via:

  http://meltin.net/hacks/emacs/

Introduction
------------

gnuserv allows you to attach to an already running Emacs.  This allows
external programs to make use of Emacs' editing capabilities.  It is
like GNU Emacs' emacsserver/server.el, but has many more features.

This is a standalone release of gnuserv for GNU Emacs, requiring
compatibility code (gnuserv-compat.el) to make it work.  It has been
tested under GNU Emacs 20.3 and 20.4.  Note that this version of
gnuserv requires the newer style of Emacs customisation stuff that
comes with Emacs 20 or higher.  It might work with the unbundled
version of custom for Emacs 19
(http://www.dina.kvl.dk/~abraham/custom/).

Note that if you run XEmacs then you do not need this package, because
gnuserv comes bundled with XEmacs.  Also, if you have XEmacs
installed, but want to use gnuserv under GNU Emacs (for some strange
reason) then all you need is gnuserv-compat.el (and probably
devices.el).  You can just make a link from your GNU Emacs site-lisp
directory to gnuserv.el in your XEmacs installation.

Origins
-------

* gnuserv.el, supporting C programs and manual page, from XEmacs
  21.1.2 (http://www.xemacs.org/).  The only change to these files is
  a tweak of the #include for config.h.

* devices.el is from the w3 4.0pre.39 distribution.

* Most of the other stuff (configure/make stuff, installation
  utilities, README.orig) is from Noah Friedman's fgnuserv package.  I
  removed a patch for Emacs 18 from the distribution because it'd be
  quite difficult to make this version of gnuserv.el work with Emacs
  18.

What did I do?

* Added gnuserv-compat.el to make gnuserv.el work with GNU Emacs.

* Tweaked the configure/make stuff to make it work for the this
  version of gnuserv. 

Installation
------------

Simple instructions:

  ./configure
  make
  make install

This configures the gnuserv compilation process for your system,
compiles C programs, and installs binaries, scripts and manual pages
(under /usr/local).  Please see INSTALL for details of how to
customise things like installation paths.

The current installation process doesn't install the elisp files.  You
should copy them to your site-lisp directory.  Then add an autoload,
as described in gnuserv-compat.el, to your ~/.emacs file or your
site-lisp/site-start.el file.

There's some support in the Makefile for byte-compiling devices.el and
gnuserv.el, but I don't seem to be able to compile gnuserv-compat.el
It is pretty small so you probably don't need to compile it.  Please
let me know if you succeed in compiling gnuserv-compat.el.

dtemacs
-------

Also available is a script called dtemacs.  This can be used to invoke
an editing session within Emacs and has been used to integrate Emacs
into desktop environments like CDE or KDE.  If Emacs can not be
contacted using gnuserv, Emacs is executed and left iconified.  Either
way, a new frame is opened to edit the specified files.

Get it from:

  http://meltin.net/hacks/emacs/src/dtemacs

I've told KDE to use dtemacs for various types of text and program
files.  

TODO
----

Not all of the configure options are defined or work properly:

* I don't know how to define SOCKADDR_SUN_LEN and BROKEN_INET_ADDR.

* INTERNET_DOMAIN_SOCKETS doesn't depend on configure at all, since it
  is just #defined in gnuserv.h.  I'm not sure that I want to change
  it.  I guess that I should!  Maybe next time.

* HAVE_INTERNET_DOMAIN_SOCKETS, HAVE_UNIX_DOMAIN_SOCKETS and
  HAVE_LIBRESOLV are defined by configure (because Noah Friedman made
  it so, and probably used them in fgnuserv), but aren't used by the
  current version of gnuserv.

* I couldn't find a definition for LONGBITS under Solaris 2.6.  I'll
  have to check again.

Maintenance
-----------

Please report problems about the following to me:

* gnuserv-compat.el (elisp errors from gnuserv.el in GNU Emacs)

* the configuration & installation procedure

* total failures to get this version of gnuserv to do anything!

If you're sure you have found a bug in the C code or gnuserv.el then,
of course, feel free to contact the maintainers of those components.
If you're not sure then please check with me.  I'd hate to bother
other people with problems that I've created!

My plan it to grab each new version of gnuserv as it appears, package
it and release it.  Please feel free to make suggestions, but remember
that I'm trying to change as little of the original gnuserv code as
possible.  My goal is to just to make new versions of gnuserv work
with GNU Emacs.

Martin Schwenke <martin@meltin.net>
http://meltin.net/people/martin/
http://meltin.net/hacks/emacs/
