CGI Programming in Elisp?

后端 未结 3 491
鱼传尺愫
鱼传尺愫 2020-12-30 16:38

Has anyone written any libraries for elisp to do CGI programming? I threw together a quick first script. However, I\'m only a long-time emacs user and I\'ve never really p

相关标签:
3条回答
  • 2020-12-30 17:01

    One way to do it is, use the httpd server in Emacs HttpServer and send request to emacs using proxy.

    0 讨论(0)
  • 2020-12-30 17:11

    I've not written any CGI scripts, but have used xmlgen to generate xml. It'd likely be easier than what you had up there - as it's easy to generate lists in Emacs and have them automatically converted to xml/html.

    This code generates the same string:

    (require 'xmlgen)
    (princ  "Content-type: text/html; charset=utf-8\n\n")
    (princ (xmlgen '(html (body (h1 :style "text-align: center" "Elisp CGI Programming")
                          (table :style "border: 1px solid"
                                 (tr (th "One")
                                     (th "Two"))
                                 (tr (th "A")
                                     (th "B")))))))
    
    0 讨论(0)
  • 2020-12-30 17:12

    This might help you out, a simple cgi library for emacs

    http://www.emacswiki.org/emacs/cgi.el

    0 讨论(0)
提交回复
热议问题