It would need proof reading, and comparing with "org-element.el", the
actual implementation of the syntax. Formalization may be better better,
too.

I didn't know that there was a single point of entry to parse elements. I think my first step will be to try to write spec tests in elisp then. Hopefully I can cover most cases in the draft, and then see if org-element returns the tree that I expect for a cursor in various positions.

Spec tests should use ERT too right ? If I try to write those, I might as well make them in a suitable way for integration in org-mode codebase.

Thanks for the draft at least, it is a very helpful kickstart !


Gerry Agbobada