Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

One lisp many emacs connections?

8 views
Skip to first unread message

Jonathan Siegel

unread,
May 17, 2000, 3:00:00 AM5/17/00
to
Hi,

I am wondering if it is possible to start a lisp process on a machine
independent from an emacs session and then have many emacs sessions
connect to this process through the emacs-lisp interface (ELI). Right
now I believe one lisp process is started per emacs eli session, and I
am not sure what steps I need to take to modify this current setup. I
am using Solaris and RedHat OS's and Allegro CL.

Thanks,
Jonathan

Erik Naggum

unread,
May 18, 2000, 3:00:00 AM5/18/00
to
* Jonathan Siegel <j...@scorekeep.com>

| I am wondering if it is possible to start a lisp process on a machine
| independent from an emacs session and then have many emacs sessions
| connect to this process through the emacs-lisp interface (ELI).

I have been looking for ways to accomplish this myself. After much
chagrin and wasting of time, I settled for Lisp listeners reachable
with ordinary Telnet sessions, and use those almost exclusively
where I need "multi-port access", while Allegro CL runs under an
Emacs in a screen that I normally stay detached from.

The core problem is that ELI uses a separate channel to communicate
signals and a few other situations that are hard to communicate
in-band. E.g., it would be confusing if Allegro CL wanted to open a
new background stream to an Emacs buffer and it did so in the wrong
Emacs. How to communicate which Emacs to talk to is unsolved.

#:Erik
--
If this is not what you expected, please alter your expectations.

foot...@thcsv01.trafford.ford.com

unread,
May 18, 2000, 3:00:00 AM5/18/00
to
Erik Naggum <er...@naggum.no> writes:

The Lucid Lisp distribution used to have something called a LEP-server
that let you remote connect from an Emacs session to the running Lisp
image. I don't know if that code is still around and whether it managed
to solve any of the problems you mention.

Guy.

Jonathan Siegel

unread,
May 20, 2000, 3:00:00 AM5/20/00
to
Erik,

Thank you for this reponse. You mention opening up telnet sessions to
the main lisp process. I remember seeing this code in a posting
before, but cannot seem to find it. Any chance you wouldn't mind
posting a snippit if you have one handy?

Thanks again,
Jonathan

Christian Lynbech

unread,
May 25, 2000, 3:00:00 AM5/25/00
to
>>>>> "Jonathan" == Jonathan Siegel <j...@scorekeep.com> writes:

Jonathan> I am wondering if it is possible to start a lisp process on
Jonathan> a machine independent from an emacs session and then have
Jonathan> many emacs sessions connect to this process through the
Jonathan> emacs-lisp interface (ELI).

Others have commented that this is not easily done directly through
the ELI interface itself, but something superficially like it could be
achieved the other way around, so to say.

Rather than having multiple emacs', you could have one emacs and
multiple frames (on different displays). Emacs has a nifty function
called `make-frame-on-display' which can be used to open frames on
another host (running X).

It is also quite simple to make some code that is able to trigger an
emacs into doing something active, kind of like `emacsclient' only
executing code rather than just specifying a file to read in (I did it
some years back, may even still have the source somewhere).

Using this you could trigger a remotely running emacs to open a frame
on your display, starting a new listener towards the existing ACL
(which the ELI can do).

Obviously, this is not quite as good as the real thing, especially if
two different people wants to connect to the lisp (it will work, but
they need to be conscious about what they do to the emacs), but if one
does not to quit ones emacs at work, but still connect from home, it
could a sensible thing to do.

Obviously, there are a bunch of security issues if not within a safe
and trusted environment, but I'll leave those as exercises for the
reader :-)


---------------------------+--------------------------------------------------
Christian Lynbech | Ericsson Telebit, Fabrikvej 11, DK-8260 Viby J
Fax: +45 8675 6881 | email: c...@ericssontelebit.com
Phone: +45 8675 6828 | web: www.ericssontelebit.com
---------------------------+--------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
- pet...@hal.com (Michael A. Petonic)

Tim Bradshaw

unread,
May 25, 2000, 3:00:00 AM5/25/00
to
* Christian Lynbech wrote:


> It is also quite simple to make some code that is able to trigger an
> emacs into doing something active, kind of like `emacsclient' only
> executing code rather than just specifying a file to read in (I did it
> some years back, may even still have the source somewhere).

gnuclient (which may or may not be the same thing as emacsclient) can
do this. It's bundled with xemacs, I don't know about fsf emacs.

--tim

Daniel Barlow

unread,
May 25, 2000, 3:00:00 AM5/25/00
to
Christian Lynbech <c...@ericssontelebit.com> writes:

> Rather than having multiple emacs', you could have one emacs and
> multiple frames (on different displays). Emacs has a nifty function
> called `make-frame-on-display' which can be used to open frames on
> another host (running X).

Unfortunately it's not as bulletproof as it could be. If the network
connection to one of its displays goes away, emacs will dump core and
die anything up to half an hour later. This is an xlib problem not an
emacs problem

Manual page XSetErrorHandler(3x):

The XSetIOErrorHandler sets the fatal I/O error handler.
Xlib calls the program's supplied error handler if any
sort of system call error occurs (for example, the connec­
tion to the server was lost). This is assumed to be a
fatal condition, and the called routine should not return.

Unless anyone knows different, anyway. I'd be very happy to be
corrected; I'd love to be able to export a frame from my laptop's
emacs to my work box, without having the thing die when I get home.

-dan

Bulent Murtezaoglu

unread,
May 25, 2000, 3:00:00 AM5/25/00
to

[...]
DB> Unless anyone knows different, anyway. I'd be very happy to
DB> be corrected; I'd love to be able to export a frame from my
DB> laptop's emacs to my work box, without having the thing die
DB> when I get home.

You can approximate this behaviour by vnc (http://www.uk.research.att.com/vnc/)
which runs the X server on the laptop and can send the display to
wherever you want. You don't lose your state or the Xserver unless the
laptop goes down.

(incf *OT-cll-posts-by-BM*)

Paul Foley

unread,
May 26, 2000, 3:00:00 AM5/26/00
to
On 25 May 2000 17:21:18 +0200, Christian Lynbech wrote:

>>>>>> "Jonathan" == Jonathan Siegel <j...@scorekeep.com> writes:
Jonathan> I am wondering if it is possible to start a lisp process on
Jonathan> a machine independent from an emacs session and then have
Jonathan> many emacs sessions connect to this process through the
Jonathan> emacs-lisp interface (ELI).

> Others have commented that this is not easily done directly through
> the ELI interface itself, but something superficially like it could be

You can do something like

(autoload 'fi::make-tcp-connection "fi-site-init" nil t)

(defun open-lisp-listener (&optional buffer-name host port password
ipc-version)
(fi::make-tcp-connection (or buffer-name "lisp-listener")
-1
'fi:lisp-listener-mode
fi:common-lisp-prompt-pattern
(or host fi::lisp-host)
(or port fi::lisp-port)
(or password fi::lisp-password)
(or ipc-version fi::lisp-ipc-version 1)
'fi::setup-tcp-connection))

and use, e.g., (open-lisp-listener "*ACL*" "localhost" 1025 123456) to
open a new connection to ACL. [The port and password are the first two
values returned by START-EMACS-LISP-INTERFACE.]

[At least, this used to work on ACL 4.3 Trial Ed.; only seems to work
after running fi:common-lisp once, though...]

--
If that makes any sense to you, you have a big problem.
-- C. Durance, Computer Science 234
(setq reply-to
(concatenate 'string "Paul Foley " "<mycroft" '(#\@) "actrix.gen.nz>"))

0 new messages