patched https://github.com/niklasfasching/go-org for orgwiki
Extension of the org & html writers is made possible by creating circular references between the extending and extended writer - that way the extending writer can forward all methods it doesn't implement to the extended writer and the extended writer can use the extending writer as the root for method calls to make sure methods overridden in the extending writer are used even for nested method calls. This circular reference leads to problems when cloning writers - cloning the extended writer merely copies the pointer to the extending writer - i.e. the extending writer does not get cloned with an updated reference to the extended writer. Thus method calls to the extending writer act as if no cloning took place and things break. The easiest solution is to just get rid of cloning. We could also clone the ExtendingWriter and replace it's reference to the extended writer with the just cloned one but that's harder so we just remove it. As there are a lot of "extending writer" and "extended writer" in the above paragraphs and I'm too lazy to write up something better here's another attempt at a TLDR: Cloning is broken as ExtendingWriter is a reference to a writer that has a reference to the writer we are cloning - that writer would have to have it's reference updated but that's hard. So we solve it it by not cloning at all. |
||
---|---|---|
etc | ||
org | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
main.go | ||
Makefile | ||
README.org |
- go-org https://travis-ci.org/niklasfasching/go-org.svg?branch=master
- development
- not yet implemented
- resources
go-org https://travis-ci.org/niklasfasching/go-org.svg?branch=master
An Org mode parser in go.
Take a look at github pages for some examples and an online org -> html demo (wasm based).
Please note that the goal for the html export is to produce sensible html output, not to exactly reproduce output the output of
org-html-export
.
development
make setup install
- change things
make preview
(regenerates fixtures & shows output in a browser)
in general, have a look at the Makefile - it's short enough.
not yet implemented
deadlines and scheduling
more types of links
see https://orgmode.org/manual/External-links.html & https://orgmode.org/manual/Internal-links.html
- radio target <<<MyTarget>>>
- link target: <<go-org>>
- link: /OrgWiki/go-org-orgwiki/src/commit/c9d11e1556f87a45bcf842b551d43f349fb92c74/go-org
- link to headline
- links with image as description
- MyTarget <- this will automatically become a link - not sure i want this…
resources
-
test files
- https://orgmode.org/manual/
- https://orgmode.org/worg/dev/org-syntax.html
-
https://code.orgmode.org/bzg/org-mode/src/master/lisp/org.el
- https://code.orgmode.org/bzg/org-mode/src/master/lisp/org-element.el
- mostly those & ox-html.el, but yeah, all of https://code.orgmode.org/bzg/org-mode/src/master/lisp/
- existing Org mode implementations: org, org-ruby, goorgeous, pandoc