all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* gnuserv as persistent elisp repl
@ 2008-11-11  0:52 Eric Schulte
  2008-11-11  3:13 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Schulte @ 2008-11-11  0:52 UTC (permalink / raw)
  To: emacs-devel

Hi,

I am working on a web-interface to some particular Emacs functionality,
and would like to be able to pass elisp forms to Emacs to be evaluated,
and then return the results to my application.

Currently I am using gnuserv to pass elisp to a persistent Emacs, and
then collect the results using the `-batch' option of gnuclient.  Is it
possible (or would it be with a reasonable amount of devel effort on my
part) to force gnuclient to remain open after evaluating and returning
the results of elisp forms, in effect acting as an elisp REPL?  I would
like this option to avoid the overhead of starting a new gnuclient
process every time I evaluate an elisp form.

Please let me know if I am misunderstanding some aspect of gnuserv, if
there is some documentation I should have already read, or if it sounds
like I am approaching this in the wrong way.

Thanks -- Eric




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gnuserv as persistent elisp repl
  2008-11-11  0:52 gnuserv as persistent elisp repl Eric Schulte
@ 2008-11-11  3:13 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2008-11-11  3:13 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emarsden, emacs-devel

> Currently I am using gnuserv to pass elisp to a persistent Emacs, and
> then collect the results using the `-batch' option of gnuclient.  Is it
> possible (or would it be with a reasonable amount of devel effort on my
> part) to force gnuclient to remain open after evaluating and returning
> the results of elisp forms, in effect acting as an elisp REPL?  I would
> like this option to avoid the overhead of starting a new gnuclient
> process every time I evaluate an elisp form.

I do not know gnuserv, but at least emacsclient does not offer this
functionality, although it's been asked for already.  IT's not
fundamentally difficult to implement, but it's difficult to integrate it
with the current server.el/emacsclient code, which is why it hasn't been
done yet.

This said, for a web-interface, one option might be to let Emacs run the
web-server for you.  Eric Marsden wrote an httpd.el a while ago, and
since then Emacs was added server sockets so it could be improved so it
doesn't require any external helper process.  This would be easier since
you don't need to care about integrating with the server.el code.

Alternatively, you could write a bit of Elisp code that implements the
FastCGI protocol.


        Stefan





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-11  3:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-11  0:52 gnuserv as persistent elisp repl Eric Schulte
2008-11-11  3:13 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.