From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [ANN] Editable HTML export of Org-mode files Date: Wed, 15 Aug 2012 09:17:47 -0600 Message-ID: <87txw4b2w4.fsf@gmx.com> References: <87pq6ua0kk.fsf@gmx.com> <87mx1wbzun.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1fzD-000258-Mi for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 11:58:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1fzC-0007Vt-1d for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 11:58:23 -0400 Received: from mailout-us.gmx.com ([74.208.5.67]:37088) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1T1fzB-0007Vf-R5 for emacs-orgmode@gnu.org; Wed, 15 Aug 2012 11:58:21 -0400 In-Reply-To: <87mx1wbzun.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 15 Aug 2012 11:25:52 +0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Abrahamsen Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Eric Abrahamsen writes: > On Tue, Aug 14 2012, Eric Schulte wrote: > >> Hi, >> >> I've recently put together a web server which runs in Emacs and exports >> local Org-mode files to HTML in such a way that they may be edited from >> within a web browser with the edits saved to local files on disk. The >> code is available from github. >> >> repository ---- https://github.com/eschulte/org-ehtml >> README ------- http://eschulte.github.com/org-ehtml >> >> This is a very thin Emacs Lisp and JavaScript wrapper around Nic >> Ferrier's elnode Emacs web server [1], and Nicolas Goaziou's structured >> Org-mode file representation and export engine. It requires Emacs 24 >> and the development versions of both Org-mode and elnode. >> >> The code is fairly new so there are likely some kinks to be worked out >> (backup your files before editing them with this web-server), but the >> implementation is very simple and should be easy to modify. See the >> README for information on how to make use of elnode's authentication >> system, or how to have web edits automatically committed to a local >> version control system. > > I gave this a very brief whirl, with the dev versions of emacs, org, > elnode, and org-ehtml, and running the test server on simple.org as > described in the README. Every time I edited a block and clicked "save", > it just deleted the whole block. I got these errors in > ~/.elnodelogs/elnode-error: > I'm not sure what could be causing this problem. Did the test suite run successfully for you? I'm betting it did if the problem didn't arise until you POSTed save data. Was the block deleted from the Org-mode file on disk, or just from the web page? What happens when you refresh the web page after an edit? > > I'd be happy to mess with this further if it would be helpful. > This would be very helpful as I can't reproduce the problem locally. Please re-run with emacs -Q using the attached batch.el ELisp file. Instructions for re-running are included in the top of the file. This will re-run on your system with a minimal configuration, and will stifle the elnode warning (which are uniformly unhelpful). --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=batch.el Content-Transfer-Encoding: quoted-printable ;;; batch.el --- Batch Emacs test for org-ehtml ;;; Instructions: ;; ;; 1. Edit the `org-ehtml-load-paths' paths below to point to the ;; related resources on your system. ;;=20=20=20=20 ;; 2. Launch an Emacs process which will load this configuration and ;; only this configuration using the -Q option as follows ;; ;; emacs -Q -l batch.el ;;=20 ;; 3. You will now be serving the example test files on port 3333. ;; Browse to http://localhost:3333/simple.org and try to perform an ;; edit through the web interface. ;; ;; 4. If the edit works then everything is working as expected, if for ;; some reason the edit doesn't work, look through the output in ;; your *Messages* buffer following the "start-relevant-output" ;; line, and see if anything looks suspicious or send this output ;; to the list. ;;; Code: (defvar org-ehtml-load-paths '("path/to/elnode" "path/to/org-mode/lisp" "path/to/org-mode/contrib/lisp" "path/to/org-ehtml/src" "path/to/org-ehtml/test/lisp") "Update these paths to set your load path.") (mapc (lambda (path) (add-to-list 'load-path path)) org-ehtml-load-paths) (require 'test-org-ehtml) (setq debug-on-error t ;; show debug info for any errors org-e-html-postamble nil ;; don't export a postamble elnode-error-log-to-messages nil ;; stifle unhelpful & noisy elnode warnin= gs org-ehtml-docroot test-org-ehtml-example-dir org-ehtml-port 3333) ;; stop the default org-ehtml server (elnode-stop 8000) (elnode-start 'org-ehtml-handler :port org-ehtml-port) ;; switch to the *Messages* buffer (switch-to-buffer "*Messages*") (message "---------------------start-relevant-output---------------------") --=-=-= Content-Type: text/plain When I run this locally, I get the following output in my *Messages* buffer. ,----[*Messages*] | ---------------------start-relevant-output--------------------- | Added to /home/eschulte/.elnodelogs/elnode-error [3 times] | Added to /home/eschulte/.elnodelogs/org-ehtml | OVERVIEW | Loading vc-git...done | Saving file /home/eschulte/.emacs.d/src/org-ehtml/test/examples/simple.html... | Wrote /home/eschulte/.emacs.d/src/org-ehtml/test/examples/simple.html | Added to /home/eschulte/.elnodelogs/elnode-error [13 times] | Added to /home/eschulte/.elnodelogs/org-ehtml | Saving file /home/eschulte/.emacs.d/src/org-ehtml/test/examples/simple.org... | Wrote /home/eschulte/.emacs.d/src/org-ehtml/test/examples/simple.org | Added to /home/eschulte/.elnodelogs/elnode-error | Saving file /tmp/org-11503Cdz... | Wrote /tmp/org-11503Cdz | OVERVIEW | Exporting... [2 times] | HTML export done, pushed to kill ring and clipboard | Added to /home/eschulte/.elnodelogs/elnode-error [5 times] `---- If this doesn't solve the problem I can send a modified version of the attached batch.el file which will include more debug output. Thanks, > > E -- Eric Schulte http://cs.unm.edu/~eschulte --=-=-=--