← Back to context

Comment by ordu

9 hours ago

> You can write a parser for org. See for example https://github.com/tgbugs/laundry.

Oh, there are a lot of incomplete parsers. This one is not an exception:

> Status

> Laundry can parse most of Org syntax, though there are still issues with the correctness of the parse in a number of cases.

> In particular there are a number of edge cases in the interaction between the syntax for various Org objects that have not been resolved.

I have my own parser as a pest grammar. It has just the basic features. This Laundry seems to implement more of org-mode, but I don't care anymore really, because I believe that org-mode will not be reimplemented.

> In part this is because the lack of a standard has not blocked most use cases since emacs is open source and can run almost anywhere.

I have some inexplicable aversion to an idea starting elisp interpreter just because my program needs org-mode parser. But even if I could integrate elisp into my program as easy as I do with lua, I probably wouldn't do it, because parser in lisp doesn't really solves the problem, it simplifies it a bit (I don't need to deal with the grammar) but shifts to another level: I need to learn how org-mode is represented as a lisp object. I need to reverse engineer the formal definition of that recursive object to deal with it, or turn on defensive programming expecting anything.

The only realistic way of dealing with org mode is to write code for emacs. There are exceptions of this rule, like pandoc, but I don't trust them.