[9892] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: emacsclient bug

daemon@ATHENA.MIT.EDU (Calvin Clark)
Mon Sep 14 17:42:01 1992

Date: Mon, 14 Sep 92 13:53:12 -0400
From: Calvin Clark <ckclark@mit.edu>
To: Jason M. Sachs <nosaj@Athena.MIT.EDU>
Cc: bugs@Athena.MIT.EDU
In-Reply-To: [9891]
Reply-To: ckclark@mit.edu

I think the quickest solution to most of emacsclient's problems on the
RS/6000 is to use the BSD section of the code rather than the SYSV
section, by compiling emacsclient.c and server.c with BSD defined and
HAVE_SYSVIPC not defined.  AIX can handle the bsdisms.  (I have tested
this and it works fine.)

That's the quickest solution.  It's not the necessarily best one,
because there are other people in the real world who are running on real
SYSV systems that don't have sockets and need that SYSV code, so we
should do our part to help work out the holes in it.  Sure, you can give
the real world the finger, if it seems in order, but sooner or later it
may be desirable to run Athena on one of these platforms, so the work
might as well be done now.

As for executing emacs if there is no server listening, this seems to be
an Athena-specific hack, although I have no idea when it crept in.  It
has been there in the oldest RCS version, which predates my work, so I
don't know what the deal is.  However, it seems that when it was added,
it was only added to the BSD section, and not to the SYSV section.
There may be a reason for this: it's harder to do this exec hack with
SYSV ipc; with BSD sockets, you can just see if the connect fails, and
give up and fork emacs right there, but with SYSV ipc, you would have to
add an explicit timeout.  A signal handler and a call to alarm() would
probably suffice, but you've still got to do the right thing if the
server starts talking to you while you're busy forking, etc.

I recommend the gnudoit/gnuclient package in the sipb locker as an
alternative to the traditional emacsclient system.  Just put the sipb
elisp directory in your path, and autoload like this:

(autoload 'server-start "gnuserv")

and use "gnuclient" in the sipb locker instead of emacsclient.

I haven't had any trouble using it on any platform, including the
RS/6000, since I fixed a signal-handler bug a few months ago.  You can
also use gnudoit to send elisp code for emacs to execute from the shell.
It's pretty funky.

Some work will be done to reduce the braindamage in emacsclient in Emacs
19.  The server program will be called "emacsserver" instead of
"server," for one thing. :-)

-Calvin

home help back first fref pref prev next nref lref last post