texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] CLisp plugin


From: David Allouche
Subject: Re: [Texmacs-dev] CLisp plugin
Date: Fri, 28 Nov 2003 17:19:02 +0100
User-agent: Mutt/1.5.4i

On Fri, Nov 28, 2003 at 12:57:18PM +0100, Joris van der Hoeven wrote:
> 
> On Fri, 28 Nov 2003, Michael Graffam wrote:
> > I've just gotten CLisp working as a plugin to TeXmacs. I'm now in the
> > process of writing some lisp functions to do useful things in TeXmacs.
> >
> > I have some Lisp code for manipulating trees. I'm going to write a
> > function to display these trees nicely via TeXmacs. I'll also write
> > functions to allow Lisp to generate TeXmacs markup.
> >
> > Any Lisp/Scheme programmers out there with some ideas of how this should
> > be done?
> 
> Displaying trees should be easy by using the "scheme" protocol and
> the TREE tag. More generally, the Scheme expressions for TeXmacs trees
> should have immediate analogues in Lisp. So compatability of the data
> formats should be easy too.
> 
> The harder part would be to use Lisp as a real extension language,
> because this presumes that Lisp knows about the existing Scheme
> functions (and types?) and vice versa. Making this possible is one
> of our more long term projects, and I think that some occasional
> discussions on this topic already took place on this mailing list
> in the past (Perl and Python).


This should be easier to do now that texmacs can load plugins with
shared objects (.so files). The basic idea would be to have a such a
shared object define a glue primitives for the external scripting
language by linking directly into the texmacs core.

This glue layer should also be able to convert internal the data
structures used for the scheme glue. This internal data format would be
used as an "universal" exchange format for various scripting languages.
A tricky part may be handling the callback structures: there are more
and more things written in Scheme which are actually core functionality
(like the DRD stuff), so you really want to be able to run into the
GUILE interpreter from your other scripting language. More generally,
your glue _should_ be fully reentrant.

A problem is there is currently no "documented stable API" (not even
talking of a stable ABI) in TeXmacs, so you would not really know what
you would be allowed to link into.  Replicating the Scheme glue would be
a good start, but even this is not really stable.

But then, we would get into the "release process" issue...

-- 
                                                            -- ddaa




reply via email to

[Prev in Thread] Current Thread [Next in Thread]