emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
West 2021-04-21T03:41:51.157500Z

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

solf 2021-04-21T04:34:24.159300Z

@c.westrom Here’s a list of parsers: https://orgmode.org/worg/org-tools/ 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 😅

solf 2021-04-21T04:36:02.160Z

This one seems to be the your best bet: https://github.com/200ok-ch/org-parser

West 2021-04-21T11:20:03.161900Z

@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.

Rupert (All Street) 2021-04-22T08:48:57.163200Z

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).

West 2021-04-22T13:19:29.163700Z

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

vemv 2021-04-21T18:26:17.162300Z

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)

vemv 2021-04-21T18:28:03.162500Z

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

anonimitoraf 2021-04-21T21:26:47.162700Z

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

West 2021-04-21T23:47:02.162900Z

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