From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: gnuserv as persistent elisp repl Date: Mon, 10 Nov 2008 22:13:17 -0500 Message-ID: References: <87y6zrdqy8.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1226373218 27637 80.91.229.12 (11 Nov 2008 03:13:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2008 03:13:38 +0000 (UTC) Cc: emarsden@laas.fr, emacs-devel@gnu.org To: "Eric Schulte" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 11 04:14:38 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kzji9-0001hs-Ao for ged-emacs-devel@m.gmane.org; Tue, 11 Nov 2008 04:14:37 +0100 Original-Received: from localhost ([127.0.0.1]:54929 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kzjh1-0003xN-Ne for ged-emacs-devel@m.gmane.org; Mon, 10 Nov 2008 22:13:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kzjgw-0003wo-U7 for emacs-devel@gnu.org; Mon, 10 Nov 2008 22:13:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kzjgu-0003wR-B8 for emacs-devel@gnu.org; Mon, 10 Nov 2008 22:13:21 -0500 Original-Received: from [199.232.76.173] (port=56202 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kzjgu-0003wK-2b for emacs-devel@gnu.org; Mon, 10 Nov 2008 22:13:20 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:28550) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kzjgt-0007m4-GA for emacs-devel@gnu.org; Mon, 10 Nov 2008 22:13:19 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArsEAEeHGElFxLQU/2dsb2JhbACBdsojg1iBEQ X-IronPort-AV: E=Sophos;i="4.33,581,1220241600"; d="scan'208";a="29661721" Original-Received: from 69-196-180-20.dsl.teksavvy.com (HELO pastel.home) ([69.196.180.20]) by ironport2-out.teksavvy.com with ESMTP; 10 Nov 2008 22:13:19 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id CE34D8997; Mon, 10 Nov 2008 22:13:17 -0500 (EST) In-Reply-To: <87y6zrdqy8.fsf@gmail.com> (Eric Schulte's message of "Mon, 10 Nov 2008 16:52:31 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:105551 Archived-At: > 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