Fork me on GitHub

Anybody know a good org mode parser for Clojure? I want to make a reagent component that can display org mode documents.


@c.westrom Here’s a list of parsers: There’s two clojure ones in there. I haven’t tried any of these personally. Good luck though if you want to go beyond basic parsing. Only org-mode truly understands org-mode 😅


This one seems to be the your best bet:


@dromar56 Thank you. I took a look at it, and it seems like it’s not very developed. I’m thinking I’ll try using asciidoc instead.


yeah I've repeatedly researched parseable org (for good reasons) and there's just no good solution. org-mode is a non-regular language or something like that, I forget the exact technical term. So it's not parseable and therefore you can only really work with org within org-mode (vs. clojure or any other lang)


200ok-ch's parser is a very laudable attempt but as you sensed, it's in a POC phase. it's super slow for inputs beyond a small threshold


In theory, one could just translate the org parser from elisp -> clojure right?


@UR37CBF8D Never thought of that. Yes I suppose you could.

Rupert (All Street)08:04:57

If you only need to support a limited subset of the syntax of org mode it's reasonably straightforward to build your own parser. We have created a super quick parser for it at work for the limited subset of syntax we needed (headings, lists, code blocks and paragraphs).


For some reason, when I passed my org document through it, it would not process lists and code blocks properly.