Python/XEmacs scripting (was Re: [FAQTS] Python Knowledge Base Update -- August 9th, 2000)

Charles G Waldman cgw at fnal.gov
Thu Aug 10 17:57:58 EDT 2000


Fiona Czuczman <fiona at sitegnome.com> writes:

> -------------------------------------------------------------
> Can I script or access the internal of (X)Emacs with Python?
> http://www.faqts.com/knowledge-base/view.phtml/aid/5254
> -------------------------------------------------------------
> Shae Erisson

This is a great question.  You can use gnuclient/gnuserv to get a
running XEmacs session to evaluate arbitrary Elisp forms; however I
haven't been able to figure out exactly how to get the return values
sent back to Python - the output wants to go into XEmacs's message
area.  Gnuclient doesn't seem to be able to say "evaluate this form
and return the expression to me".  (Maybe this can be done, I just
don't know how).

There's a somewhat experimental feature in newer (maybe beta-only?)
version of XEmacs which allow runtime loading of 'modules' in the form
of shared object files.  One could conceivably write such a module for
interfacing with Python - one could even embed a Python interpreter
into XEmacs.  This to me sounds like a really fun project.





More information about the Python-list mailing list