eschulte / org-ehtml Goto Github PK
View Code? Open in Web Editor NEWExport Org-mode files as editable web pages
License: GNU General Public License v3.0
Export Org-mode files as editable web pages
License: GNU General Public License v3.0
I have emacs 24.3.1 and the following modules installed.
When I start emacs I get this error
Debugger entered--Lisp error: (void-function set-default-toplevel-value)
(set-default-toplevel-value symbol expanded)
(let* ((orig (eval value)) (expanded (expand-file-name orig))) (if (string= expanded orig) nil (warn "expanded `org-ehtml-docroot' from %S to %S" orig expanded)) (set-default-toplevel-value symbol expanded))
(lambda (symbol value) (let* ((orig (eval value)) (expanded (expand-file-name orig))) (if (string= expanded orig) nil (warn "expanded `org-ehtml-docroot' from %S to %S" orig expanded)) (set-default-toplevel-value symbol expanded)))(or$
custom-declare-variable(org-ehtml-docroot (expand-file-name "public_org" (expand-file-name ".." (file-name-directory (or load-file-name (buffer-file-name))))) "Document root from which to serve Org-mode files.\nThis value should be fu$
eval-buffer(#<buffer *load*-124466> nil "/Users/pittsb/.emacs.d/elpa/org-ehtml-20140419.1756/org-ehtml-server.el" nil t) ; Reading at buffer position 2029
load-with-code-conversion("/Users/pittsb/.emacs.d/elpa/org-ehtml-20140419.1756/org-ehtml-server.el" "/Users/pittsb/.emacs.d/elpa/org-ehtml-20140419.1756/org-ehtml-server.el" nil t)
require(org-ehtml-server "/Users/pittsb/.emacs.d/elpa/org-ehtml-20140419.1756/org-ehtml-server.el")
byte-code("\302^H\206^G^@\303 !^Y\304\305\306\307!\"\210\304\310\306\311!\"\210)\312\313!\207" [load-file-name default-directory file-name-directory buffer-file-name require ox-ehtml expand-file-name "ox-ehtml.el" org-ehtml-server "or$
require(org-ehtml)
eval-buffer(#<buffer *load*> nil "/Users/pittsb/.emacs.d/init.el" nil t) ; Reading at buffer position 333
load-with-code-conversion("/Users/pittsb/.emacs.d/init.el" "/Users/pittsb/.emacs.d/init.el" t t)
load("/Users/pittsb/.emacs.d/init" t t)
#[0 "^H\205\262^@ \306=\203^Q^@\307^H\310Q\202;^@ \311=\204^^^@\307^H\312Q\202;^@\313\307\314\315#\203*^@\316\202;^@\313\307\314\317#\203:^@\320\nB^R\321\202;^@\316\322^S\323^A\322\211#\210^K\322=\203a^@\324\325\326\307^H\327Q!\"\$
command-line()
normal-top-level()
In my init.el I tried changing (setq org-ehtml-docroot "/example/b/")
to (setq org-ehtml-docroot (expand-file-name "/example/b/"))
per the documentation change at ee4b5d6, but that did not solve the problem.
Is this still supposed to work, cause my files are just plain html files;)
I've tried testing with the supplied examples.
Not really sure how to troubleshoot;)
Is org-ehtml actually on elpa? I can't seem to find it on the package list.
Is the intent that we just git clone the github repo?
Hello!
When trying to open any org file in the list shown by webserver, the error appears:
Caught Error: (error "Unknown \"nil\" back-end: Aborting export")
Same error shown in emacs when trying to call functions org-ehtml-export-to-html
or org-ehtml-export-as-html
Any hints, please?
Exporting the following org file to html and editing the list in the browser messes up the org file:
#+TITLE: Some Test for ehtml with source blocks
* First Section
Some source block that could mess up the org buffer:
#+BEGIN_SRC emacs-lisp :export results
"hello"
#+END_SRC
#+RESULTS:
: hello
- here
- we
- have
- a
- list
This is caused by def-ehtml-wrap
using positions of the export buffer which is a modified copy of the original org buffer.
Header args and results are removed.
I've installed org-ehtml-20140501
When I browse to most org files, in my browser I get this message in my browser
Caught Error: (wrong-type-argument numberp nil)
However, some org files do render correctly.
I googled a bit to see if I could debug this and tried setting toggle-debug-on-error
in emacs, but no debugger appears.
I've got a 500 error from the web server and I've traced the error to the org-ehtml-export-file function:
ELISP> (org-ehtml-export-file "/home/patrick/public_org/complex.org") *** Eval error *** Wrong number of arguments: #[(templates) "\212eb\210\306�\307\310\306\311#\205\\�\312 �\313 !\314=\203X�\315 \"�\316\317 \"\211� \316\320 \"E\211��\235\203<�\321\322\316\323 \"\"\210\202W��\203W� �B�\316\324 \"b\210\325\306x\210`|\210\212�c\210)+)\202��*\207" [record object templates value begin signature nil re-search-forward "{{{[-A-Za-z0-9_]" t org-element-context org-element-type macro org-macro-expand org-element-property :begin :args error "Circular macro expansion: %s" :key :end " "] 6 ("/usr/share/emacs/24.4/lisp/org/org-macro.elc" . 379
I'm running org-ehtml-20140427. In my init.el I have
(setq org-ehtml-docroot (expand-file-name "/example/b/"))
However, when I visit the wiki I get this message
Caught Error: (file-error "Opening input file" "no such file or directory" "/Users/pittsb/.emacs.d/elpa/public_org")
I originally had:
(setq org-ehtml-docroot "~/Dropbox/Org")
However whenever I directed the browser to http://localhost:8888, I would see a directory listing of files, but if I selected a .org file, I would get a "404 not found" response. If I made the value an absolute path as below, this fixed the issue. I don't know if this is expected behaviour, but it would be nice to support ~ syntax if possible.
(setq org-ehtml-docroot "/home/sits/Dropbox/Org")
Hi,
I have just discovered your great project and I'm wondering if you plan to integrate the new features of Emacs 25 webkit browser to see the html files directly in Emacs itself.
Anyway, long life to your project.
Regards,
François
ELISP> (require 'test-org-ehtml)
*** Eval error *** Cannot open load file: no such file or directory, test-org-ehtml
Do I need to have some testing stuff installed to do this? (Emacs newb)
A user I support has a directory tree that is like the following.
/example/b/artistry/
/example/b/artistry/org
/example/b/artistry/org/gp_mtg_recordings
/example/b/artistry/org/whiteboard_images
/example/b/artistry/papers
/example/b/artistry/papers/current
/example/b/artistry/papers/done
/example/b/artistry/papers/fame
/example/b/artistry/papers/limbo
/example/b/artistry/papers/mechanics
/example/b/artistry/papers/nascent
/example/b/artistry/papers/posters
/example/b/artistry/papers/symbols
/example/b/artistry/papers/theses
/example/b/artistry/papers/venues_possibles
/example/b/artistry/references
/example/b/artistry/references/bibliography
/example/b/artistry/references/obsolete
She has org files scattered throughout all these directories and even deeper. We're trying to make them all web-viewable and editable with org-ehtml.
I set org-ehtml-docroot to "/example/b/artistry/".
When I load http://example.com:8888 I get
<ul><li><a href=".">.</a></li>
<li><a href="..">..</a></li>
<li><a href=".DS_Store">.DS_Store</a></li>
<li><a href=".git">.git</a></li>
<li><a href=".gitignore">.gitignore</a></li>
<li><a href="master.html">master.html</a></li>
<li><a href="org">org</a></li>
<li><a href="papers">papers</a></li>
<li><a href="references">references</a></li></ul>
which is fine. If I click references my browser loads http://example.com:8888/references and I get
<ul><li><a href=".">.</a></li>
<li><a href="..">..</a></li>
<li><a href=".DS_Store">.DS_Store</a></li>
<li><a href="bibliography">bibliography</a></li>
<li><a href="obsolete">obsolete</a></li></ul>
The links do not include the path from the document root. E.G. they are to bibliography and obsolete when they should be to references/bibliography and references/obsolete.
If I click the link to bibliography I get the error "no such file or directory", as you would expect given the above.
If I manually enter http://example.com:8888/references/bibliography in my address bar I can visit that page.
I think I'm on the right path to fixing this and will followup shortly.
Currently the styling is ox-ehtml.css and the only way to override to my understanding is to edit the ox-ehtml.css directly. It would be nice to have a variable which would allow an override of the CSS.
Are you open to this idea?
Doesn't work with Org-mode 8.0 beacause of the rewriting of the new export engine.
"org-export" is now obsolete.
I am trying to run org-ehtml as a service so that multiple people can edit a single set of org files via the web. Eventually I plan to start a dedicated emacs instance for this via launchd, but for now I am just testing with emacs running in a GNU screen session.
Initially, the pages display fine. However, if a user edits one of the org files via an emacs session on the machine, org-ehtml stops working. When I log in and reattach to my gnu screen session running emacs, I see tthe prompt.
File master.org changed on disk. Reread from disk? (yes or no)
What causes this prompt, and how can I either disable it or automatically answer yes?
Hello! I suspect these two in-buffer options don't work as expected:
#+HTML_EVERYTHING_EDITABLE: t
#+HTML_EDITABLE_HEADLINES: t
or maybe I haven't understood how to use them.
I thought they would override the defcustom variables
org-ehtml-everything-editable
and org-ehtml-editable-headlines
but they seem to have no effect at all.
Is it reproducible for you as well? (I mean: the fact that setting
in-buffer options to t
doesn't produce the EDIT
buttons).
This is a non-critical issue: defcustom variables do work.
Thanks in advance for any help or advice, kindest regards.
Andrea
----- my environment ----
Would this allow for editing org files from my mobile (Android) device and thus syncing orgfiles between computer and phone?
I have an example org file which refers to a local image:
[[~/Pictures/test.jpg]]
When I serve this file using org-ehtml, the relevant fragment is as follows:
<div class="edit_in_place">
<div class="figure">
<p><img src="file:///home/sits/Pictures/test.jpg" alt="test.jpg" />
</p>
</div></div><div class="raw-org" contents-begin="429" contents-end="453">[[~/Pictures/test.jpg]]
</div>
</div>
With the HTML above, Firefox only renders the "alt" text rather than displaying the image. If I remove the out <div>
elements with the "edit_in_place" class, it works.
I wonder if for images, could they not be editable so that they are properly displayed inline?
In the browser, the following org
** TODO get new battery for small UPS for hestia :toni:
look up battery on amazon, and see if it's worth replacing or just getting
a new ups
is transformed to
<div id="outline-container-sec-3-2" class="outline-3">
<h3 id="sec-3-2"><span class="section-number-3">3.2</span> <span class="todo TODO">TODO</span> get new battery for small UPS for hestia <span class="tag"><span class="toni">toni</span></span></h3>
<div class="outline-text-3" id="text-3-2">
<input style="display: none;" value="EDIT" class="edit_button" type="button"><div class="edit_in_place"><p>
look up battery on amazon, and see if it's worth replacing or just getting
a new ups
</p></div><div class="raw-org" contents-begin="3629" contents-end="3714">look up battery on amazon, and see if it's worth replacing or just getting
a new ups
</div>
</div>
</div>
This provides the option to edit the text under the headline, but not the text of the headline itself.
I get this error when I have an R source code block in my org file:
Caught Error: (user-error "Cannot find original buffer position starting search at position 910")
The source code block I tried was:
#+NAME: temp
#+BEGIN_SRC R :results value :exports results :hlines :colnames yes
data.frame(v1=c(1:5),v2=c(1:5))
#+end_src
The error vanishes if I change exports to "none".
Here is my script:
(use-package org-ehtml
:requires web-server
:config
(setq org-ehtml-docroot (expand-file-name "~/public_org"))
(setq org-ehtml-everything-editable t)
:init
(require 'org-ehtml)
(ws-start org-ehtml-handler 9000))
inside of my public_org is a single projects.org file
The error message I get is:
org-ehtml/:init: make server process
failed: Success, :name, ws-server,
:service, 9000, :filter, ws-filter,
:server, t, :nowait, t,
:family, ipv4, :coding, no-conversion,
:plist, (
:server #s(#s(
eieio--class ws-server nil nil [
#s(cl-slot-descriptor handlers nil t nil)
#s(cl-slot-descriptor process nil t nil)
#s(cl-slot-descriptor port nil t nil)
#s(cl-slot-descriptor requests nil t nil)
]
#s(hash-table size 65 test eq rehash-size 1.5 rehash-threshold 0.8125 data
(handlers 0 process 1 port 2 requests 3))
nil ((:handlers . handlers) (:process . process) (:port . port) (:requests . requests)) [] []
#s(#2 nil nil nil nil) (:custom-groups nil))
(((:GET . .*) . org-ehtml-file-handler)
((:POST . .*) . org-ehtml-edit-handler)) nil 9000 nil)), :log, nil
Hello, here's a recipe to reproduce my problem.
index.org
and put it in your ehtml docroot:# -*- coding: utf-8 -*-
#+TITLE: mytitle
#+HTML_EDITABLE_HEADLINES: t
#+HTML_EVERYTHING_EDITABLE: t
* myheader :EDITABLE:
mytext... citta.
enable the server with (progn (require 'org-ehtml) (ws-start org-ehtml-handler 1000))
open your browser and go to http://localhost:10000
hover the text mytext... citta.
, click the EDIT
button at the right side, change citta
into città
(it's the Italian "accented a" letter, Unicode U+00E0
, UTF-8 encoding c3 a0
), click "Save"
now look at your Emacs, you will see that a message appears: utf-8-dos cannot encode these: \303 \240
, and Emacs prompts for you to amend the "wrong" chars or to select another charset.
Prompt at point 5) is undesired behaviour. And even if I choose a charset (utf-8, iso-8859-1 etc.) then I still get in \303 \240
in index.org
instead of à
.
My workaround: I get a correct behaviour if (before performing point 4) I visit index.org
and type M-x toggle-enable-multibyte-characters RET
(i.e. change multibyte from enabled to disabled) and keep that buffer open.
Is this reproducible for you too? Any idea of what could be wrong?
Thanks, kindest regards.
Andrea
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.