From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: Is there a mod-emacs? Date: Sun, 06 Jan 2008 20:35:53 +1100 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <871w8vwb2e.fsf@lion.rapttech.com.au> References: <4870e7ae-ab72-4d0b-8d42-9a4ed0a54e8d@e23g2000prf.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1199612585 7272 80.91.229.12 (6 Jan 2008 09:43:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 6 Jan 2008 09:43:05 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 06 10:43:25 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JBS2P-0008BB-Fj for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Jan 2008 10:43:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JBS22-0006YD-Qy for geh-help-gnu-emacs@m.gmane.org; Sun, 06 Jan 2008 04:43:02 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!out02a.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!news-in-02.newsfeed.easynews.com!easynews.com!easynews!sn-xt-sjc-02!sn-xt-sjc-06!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:4MLTfg1Y53BOZarDAo3NW//KpCE= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 33 Original-Xref: shelby.stanford.edu gnu.emacs.help:155109 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50528 Archived-At: rustom writes: > Just as there are mod-perl mod-python etc for apache is there > something like mod-emacs of some sort? > > Context is as follows: > > org mode has org-export-as-html which produces html for the > corresponding org file. > > If apache could be configured to talk to emacs then when it is asked > to serve a .org file, say foo.org it could do > > emacs -batch -eval '(org-export-as-html foo.org)' > > and serve the resulting html. There is an emacs elisp httpd server (at least there use to be one), but no mod_emacs that I'm aware of. Of course, this is a rather resource expensive way of serving a few pages - you would always have to have an emacs image loaded or accept fairly slow responses (depending on machine/resoruces etc). I think a better solution would be to add a hook to the org mode save function that does an automatic export as html whenever the org file is updated. The pages can then be served by a regular httpd process and as a new export is done whenever the org file is saved, the pages will always be up-to-date (provided they are edited by emacs of course). Tim -- tcross (at) rapttech dot com dot au