From: IBMackey
Subject: Using any editor with lisp
Date: 
Message-ID: <3dyzuu7p.fsf@stic.net>
I like the way xemacs/emacs interfaces with lisp. What I would like to 
do is work some of the same kind of magic with other editors. Here's
my idea? 

Let's suppose we use nedit or vim. In each of those editors you can
write simple macros to highlight a section, function, and then save
that function to say "/tmp/function.lisp".

When I've loaded the editor, I would load lisp in another window with
a function that does the following:

(loop
   (setq mytime (read-date-file "/tmp/function.lisp"))
   (if (not (= mytime pastime))
	   (progn
		(load "/tmp/function.lisp")
		(setq pastime mytime))
       (sleep 2)))

In other words, I could have lisp (for my occassion cmucl) listening
to any editor. If I couldn't find a function that read the time date
of the file, I could name the file /tmp/(current-time).lisp and match
that. 

In cmucl, when an error condition would occur, it should go into debug 
mode, and then allow me to return to the function. (and I would get
the benefits of cmucl's excellent trace and debug features).

What do you'all thing? Any problems, I should watch out for? Or is
there a simpler way to get to gloucamoira?

Thanks,

i.b.

From: David Bakhash
Subject: Re: Using any editor with lisp
Date: 
Message-ID: <cxjlncr2kj0.fsf@acs5.bu.edu>
My opinion on editors is the following.

Just today I got Harleqin LispWorks working with GNU Emacs on Windows NT.  I'm
using ilisp.  I've also used the Allegro CL/Emacs interface extensively.  My
opinion is that Emacs and XEmacs have such excellent interfaces, and they're
such good editors, that it boggles my mind that anyone would rather use
another editor.  Emacs is one of many editors I've used, and it is by far the
best.  I think Lispers who don't use Emacs should bite the bullet.  Of course,
some Lisps come with IDEs, and if they prefer those, which tend to be more
functional WRT Lisp, but less WRT editing text, then so be it.

Finally, the best way I can see to hook into editors is the client-server
way.  It would work in the following way:

think up some minimum functionality that you want you want Lisp to carry out.
i.e. think up some methods, objects, etc:

create-new-listener
eval-region
compile-region
eval-defun
compile-defun
...

Now, write that stuff on the Lisp side, in CLOS, specifying an interface that
realisically can exist in the lowest common denomenator of editors (i.e. don't
assume that you've got Emacs functionality WRT windows/buffers/frames, etc.)

so, you might create some default streams, such as *editor-stdout* and
*editor-stderr*, and your Lisp routines can write to those.

Then you can implement those methods on the client side (i.e. each editor you
care about).  I think that a socket connection (or wire, if you're using
CMUCL) is the way to go.  Your lisp will have a server thread, in such a
case.  Keeping this general, functional, portable will be a nightmare, and
implementing it for each lisp/editor will not be fun either.

I think it would be easier to write an elisp interpreter for the editor and
then just use ilisp :-)

dave
From: Marco Antoniotti
Subject: Re: Using any editor with lisp
Date: 
Message-ID: <lwemij9g25.fsf@copernico.parades.rm.cnr.it>
IBMackey <ยทยทยทยท@stic.net> writes:

> I like the way xemacs/emacs interfaces with lisp. What I would like to 
> do is work some of the same kind of magic with other editors. Here's
> my idea? 
> 
> Let's suppose we use nedit or vim.

Why?  Why in the world would you do that? :)  Stuff 'emacs -i &' in
your .xinitrc (or equivalent) and be done with it. :)

Cheers


-- 
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa