all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is there a mod-emacs?
@ 2008-01-03 16:37 rustom
  2008-01-03 21:06 ` Bastien
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: rustom @ 2008-01-03 16:37 UTC (permalink / raw)
  To: help-gnu-emacs

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.

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

* Re: Is there a mod-emacs?
  2008-01-03 16:37 Is there a mod-emacs? rustom
@ 2008-01-03 21:06 ` Bastien
  2008-01-06  9:35 ` Tim X
       [not found] ` <mailman.5676.1199394418.18990.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 12+ messages in thread
From: Bastien @ 2008-01-03 21:06 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Rustom,

rustom <rustompmody@gmail.com> writes:

> Just as there are mod-perl mod-python etc for apache is there
> something like mod-emacs of some sort?

so far I've only met mod-lisp, mod-scheme, mod-guile:

mod-lisp: 

  http://common-lisp.net/cgi-bin/mailman/listinfo/mod-lisp-devel
  http://bc.tech.coop/blog/051219.html

mod-scheme:

  http://code.google.com/p/mod-scheme/

mod-guile:

  https://savannah.nongnu.org/cvs/?group=mod-guile

This latter project looks dead.  I've not tested any of these solutions.
Some time ago, I set up a org->HTML online converter, but this was done
through python: the script ran an "emacs -batch" instance and the HTML
output was then opened. 

I'd also be interested in more information on any mod-emacs thingy!

-- 
Bastien

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

* Re: Is there a mod-emacs?
  2008-01-03 16:37 Is there a mod-emacs? rustom
  2008-01-03 21:06 ` Bastien
@ 2008-01-06  9:35 ` Tim X
  2008-01-06 10:01   ` thorne
       [not found] ` <mailman.5676.1199394418.18990.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 12+ messages in thread
From: Tim X @ 2008-01-06  9:35 UTC (permalink / raw)
  To: help-gnu-emacs

rustom <rustompmody@gmail.com> 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

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

* Re: Is there a mod-emacs?
  2008-01-06  9:35 ` Tim X
@ 2008-01-06 10:01   ` thorne
  2008-01-07  5:56     ` Tim X
  0 siblings, 1 reply; 12+ messages in thread
From: thorne @ 2008-01-06 10:01 UTC (permalink / raw)
  To: help-gnu-emacs

Tim X <timx@nospam.dev.null> writes:

> There is an emacs elisp httpd server (at least there use to be one), but no
> mod_emacs that I'm aware of. 

I wonder about the security of such a thing.  But it would be fun to try
getting it to serve my personal web page.

> 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).

True, but the fun would be in using Emacs to do dynamically generated
pages.  Emacs could be the world's slowest Web Application
Framework(tm).

-- 
Theron Ttlåx

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

* Re: Is there a mod-emacs?
  2008-01-06 10:01   ` thorne
@ 2008-01-07  5:56     ` Tim X
  2008-01-07 16:55       ` Mathias Dahl
  0 siblings, 1 reply; 12+ messages in thread
From: Tim X @ 2008-01-07  5:56 UTC (permalink / raw)
  To: help-gnu-emacs

thorne <thorne@timbral.net> writes:

> Tim X <timx@nospam.dev.null> writes:
>
>> There is an emacs elisp httpd server (at least there use to be one), but no
>> mod_emacs that I'm aware of. 
>
> I wonder about the security of such a thing.  But it would be fun to try
> getting it to serve my personal web page.
>
>> 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).
>
> True, but the fun would be in using Emacs to do dynamically generated
> pages.  Emacs could be the world's slowest Web Application
> Framework(tm).
>

...and there is nothing wrong with trying to do something just to see if it
can be done. I've never written an apache module, but suspect it could be a
little difficult to do a true mod_emacs. It would be interesting to see if
you could do something using the new emacs multiple tty support through
emacs server. 

Another approach that might be interesting is to create an emacs lisp
package for common lisp. You could then take advantage of mod_lisp. Not
sure how you would handle the lisp1 vs lisp2 differences, but I suspect it
would be possible. In fact, its probably fairly straight-forward to
implement elisp inside common lisp - going the other direction may prove
difficult (I'm talking ansi compatibility not just function compatibility
as is provided by the 'cl package). 

Certainly could be an interesting project for someone wanting something to
sink their teeth into and get to actually know elisp.

Tim

-- 
tcross (at) rapttech dot com dot au

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

* Re: Is there a mod-emacs?
  2008-01-07  5:56     ` Tim X
@ 2008-01-07 16:55       ` Mathias Dahl
  2008-01-08  1:11         ` Mike Mattie
  2008-01-08  1:16         ` Tim X
  0 siblings, 2 replies; 12+ messages in thread
From: Mathias Dahl @ 2008-01-07 16:55 UTC (permalink / raw)
  To: help-gnu-emacs

Tim X <timx@nospam.dev.null> writes:

> Another approach that might be interesting is to create an emacs
> lisp package for common lisp. You could then take advantage of
> mod_lisp. Not sure how you would handle the lisp1 vs lisp2
> differences

Both are Lisp2, aren't they? Maybe you thought about lexical vs
dynamical scoping?

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

* Re: Is there a mod-emacs?
       [not found] ` <mailman.5676.1199394418.18990.help-gnu-emacs@gnu.org>
@ 2008-01-07 19:52   ` Joel J. Adamson
  2008-01-07 21:29     ` thorne
  2008-01-08  1:05     ` Tim X
  0 siblings, 2 replies; 12+ messages in thread
From: Joel J. Adamson @ 2008-01-07 19:52 UTC (permalink / raw)
  To: help-gnu-emacs

Bastien <bzg@altern.org> writes:

> Hi Rustom,
>
> rustom <rustompmody@gmail.com> writes:
>
>> Just as there are mod-perl mod-python etc for apache is there
>> something like mod-emacs of some sort?

> Some time ago, I set up a org->HTML online converter, but this was done
> through python: the script ran an "emacs -batch" instance and the HTML
> output was then opened. 

Good idea: this would be a great way to keep up my schedule without
ferrying my org files from machine to machine.  However...

Did you get real checkboxes on org export to html?  I've been
considering trying to patch the code to do that.  My currently loaded
version of org-mode produces just "- [ ]" instead of an html checkbox.
Is there any discussion of changing the behavior?

Joel

-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

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

* Re: Is there a mod-emacs?
  2008-01-07 19:52   ` Joel J. Adamson
@ 2008-01-07 21:29     ` thorne
  2008-01-08  1:05     ` Tim X
  1 sibling, 0 replies; 12+ messages in thread
From: thorne @ 2008-01-07 21:29 UTC (permalink / raw)
  To: help-gnu-emacs

jadamson@partners.org (Joel J. Adamson) writes:

> Good idea: this would be a great way to keep up my schedule without
> ferrying my org files from machine to machine.  However...
>
> Did you get real checkboxes on org export to html?  I've been
> considering trying to patch the code to do that.  My currently loaded
> version of org-mode produces just "- [ ]" instead of an html checkbox.
> Is there any discussion of changing the behavior?

Actually a generalized html generation library (or xml) might be a nice
thing for Emacs (maybe it already has one...?).  I am not sure about Org
mode, but i am pretty sure Emacs Muse uses regexp substitution on a
buffer to generate html--which is great (i use Muse for my web page) but
it might also be nice to have something like Common Lisp's lml2 for
creating html from lisp code.  I hacked up the beginning of something
for my own use using Common Lisp macros once and it wasn't that hard to
do.  The syntax ended up something like:

(html
 (head
  (title "Foo"))
 (body
  (h1 "Snee")
  (p "This is a paragraph, etc...")
  (p "So's this!")))

Of course you need to handle xml attributes and a few things like
that.... Though now that i write this, it occurs to me that there has to
be something like this already around somewhere.

-- 
Theron Ttlåx

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

* Re: Is there a mod-emacs?
  2008-01-07 19:52   ` Joel J. Adamson
  2008-01-07 21:29     ` thorne
@ 2008-01-08  1:05     ` Tim X
  2008-01-08 15:56       ` Joel J. Adamson
  1 sibling, 1 reply; 12+ messages in thread
From: Tim X @ 2008-01-08  1:05 UTC (permalink / raw)
  To: help-gnu-emacs

jadamson@partners.org (Joel J. Adamson) writes:

> Bastien <bzg@altern.org> writes:
>
>> Hi Rustom,
>>
>> rustom <rustompmody@gmail.com> writes:
>>
>>> Just as there are mod-perl mod-python etc for apache is there
>>> something like mod-emacs of some sort?
>
>> Some time ago, I set up a org->HTML online converter, but this was done
>> through python: the script ran an "emacs -batch" instance and the HTML
>> output was then opened. 
>
> Good idea: this would be a great way to keep up my schedule without
> ferrying my org files from machine to machine.  However...
>
> Did you get real checkboxes on org export to html?  I've been
> considering trying to patch the code to do that.  My currently loaded
> version of org-mode produces just "- [ ]" instead of an html checkbox.
> Is there any discussion of changing the behavior?
>

But do you really want HTML checkboxes? The content you are creating is
static and not connected to a backend via any form of CGI. If you used real
html checkboxes, radio buttons and other HTML elements normally used in
forms, it could create confusion and possibly incorrrect information. For
example, with a checkbox, you could 'check' it on the page and change its
status, but that would not change the actual status of anything. The page
would show incorrect information until it was refreshed, at which time it
would revert back to its original setting in the rendered output. 

Maybe a better solution would be to have some images representing checked
and unchecked choices. These would/could give a better visual format and
not be accidently changed through an unintentional mouse click or keyborad
shortcut. 

Tim

-- 
tcross (at) rapttech dot com dot au

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

* Re: Is there a mod-emacs?
  2008-01-07 16:55       ` Mathias Dahl
@ 2008-01-08  1:11         ` Mike Mattie
  2008-01-08  1:16         ` Tim X
  1 sibling, 0 replies; 12+ messages in thread
From: Mike Mattie @ 2008-01-08  1:11 UTC (permalink / raw)
  To: help-gnu-emacs


[-- Attachment #1.1: Type: text/plain, Size: 764 bytes --]

On Mon, 07 Jan 2008 17:55:49 +0100
Mathias Dahl <brakjoller@gmail.com> wrote:

> Tim X <timx@nospam.dev.null> writes:
> 
> > Another approach that might be interesting is to create an emacs
> > lisp package for common lisp. You could then take advantage of
> > mod_lisp. Not sure how you would handle the lisp1 vs lisp2
> > differences
> 
> Both are Lisp2, aren't they? Maybe you thought about lexical vs
> dynamical scoping?

elisp is definitely lisp2 in that a symbol has both a function value
and a variable value. elisp is dynamically scoped by default unless
lexical-let is used.

______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

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

* Re: Is there a mod-emacs?
  2008-01-07 16:55       ` Mathias Dahl
  2008-01-08  1:11         ` Mike Mattie
@ 2008-01-08  1:16         ` Tim X
  1 sibling, 0 replies; 12+ messages in thread
From: Tim X @ 2008-01-08  1:16 UTC (permalink / raw)
  To: help-gnu-emacs

Mathias Dahl <brakjoller@gmail.com> writes:

> Tim X <timx@nospam.dev.null> writes:
>
>> Another approach that might be interesting is to create an emacs
>> lisp package for common lisp. You could then take advantage of
>> mod_lisp. Not sure how you would handle the lisp1 vs lisp2
>> differences
>
> Both are Lisp2, aren't they? Maybe you thought about lexical vs
> dynamical scoping?

Your right - not sure where my head was at. The different scoping,
package/namspaces and things like buffer local variables etc were some of
the differences I was thinking about and not the seperation of
variable/function namespaces, function shadowing etc.

Tim 


-- 
tcross (at) rapttech dot com dot au

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

* Re: Is there a mod-emacs?
  2008-01-08  1:05     ` Tim X
@ 2008-01-08 15:56       ` Joel J. Adamson
  0 siblings, 0 replies; 12+ messages in thread
From: Joel J. Adamson @ 2008-01-08 15:56 UTC (permalink / raw)
  To: help-gnu-emacs

Tim X <timx@nospam.dev.null> writes:

> jadamson@partners.org (Joel J. Adamson) writes:
>
>> Bastien <bzg@altern.org> writes:
>>
>>> Hi Rustom,
>>>
>>> rustom <rustompmody@gmail.com> writes:
>>>
>>>> Just as there are mod-perl mod-python etc for apache is there
>>>> something like mod-emacs of some sort?
>>
>>> Some time ago, I set up a org->HTML online converter, but this was done
>>> through python: the script ran an "emacs -batch" instance and the HTML
>>> output was then opened. 
>>
>> Good idea: this would be a great way to keep up my schedule without
>> ferrying my org files from machine to machine.  However...
>>
>> Did you get real checkboxes on org export to html?  I've been
>> considering trying to patch the code to do that.  My currently loaded
>> version of org-mode produces just "- [ ]" instead of an html checkbox.
>> Is there any discussion of changing the behavior?
>>
>
> But do you really want HTML checkboxes? 

Hmmm...let me think about that.

>  For example, with a checkbox, you could 'check' it on the page and
> change its status, but that would not change the actual status of
> anything. 

Well, hopefully I would have completed something, and the real-world
status would change ;)

> The page would show incorrect information until it was refreshed, at
> which time it would revert back to its original setting in the
> rendered output.

Good point.  I think I need to work out a few kinks before I fully
implement it.  Org mode is totally sweet without adding this feature, I
must say.

Joel
-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109

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

end of thread, other threads:[~2008-01-08 15:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03 16:37 Is there a mod-emacs? rustom
2008-01-03 21:06 ` Bastien
2008-01-06  9:35 ` Tim X
2008-01-06 10:01   ` thorne
2008-01-07  5:56     ` Tim X
2008-01-07 16:55       ` Mathias Dahl
2008-01-08  1:11         ` Mike Mattie
2008-01-08  1:16         ` Tim X
     [not found] ` <mailman.5676.1199394418.18990.help-gnu-emacs@gnu.org>
2008-01-07 19:52   ` Joel J. Adamson
2008-01-07 21:29     ` thorne
2008-01-08  1:05     ` Tim X
2008-01-08 15:56       ` Joel J. Adamson

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.