This banner text can have markup.
git clone ngortheone-org-rs_-_2019-04-15_04-01-30.bundle -b master
Org Mode parser re-write in Rust
! Warning, this project is in early development !
Org is probably the best and most complete plain textorganizational system known to mankind. It has countless applications likeauthoring, publishing, task and time tracking, journal, blog, agenda, wikietc...
Unfortunately Org was originally developed for Emacs and thereforeavailable only inside Emacs. It is a huge limiting factor for Org's developmentand popularization. Because of that it is not as popular outside of Emacscommunity as it should be.
Many attempts were made to fix this. It all starts with a parser.But because Org's syntax is not trivial and in fact most of it iscontext-sensitivewith only a few context-free elements, it is quite easy to get it wrong. Some Org parsers have chosen to focus on a restricted subset of Org's syntax likeorg-ruby or pandoc.More ambitious project try to cover all features but since Org does not have aformal specification1 they rely on observed Org's behavior in Emacsor author's intuition. As a result they rarely get finished.
But the absence of a good a spec and the complexity of the grammar are not showstoppers. Why reinventing the wheel when we can just copy it! This projecttakes the only surefire way to get it right - use the original elisp parserimplementation as a blueprint!
These are the choices that were made to achieve the goals:
Rust. Because it is fast, memory safe and provides C FFI. And most importantly it is cool.
Original elisp algorithm. While using the original elisp source as a guidelinemight result in less idiomatic Rust code it has its advantages:
Scope of work is well-defined and finish line is visible. This should encouragecontributions even from people who want to get started with Rust.
Getting "feature-complete" is just a matter of getting to the finish line.
element - parser crate is currently the main and only focus.It should perform just 2 tasks. Generate concrete syntax tree and serialize itback to canonical Org representation.
The rest of the roadmap is not fully flashed out. Feature-complete parser opens a lot of possibilities, here are just a few of my ideas:
Language server - a way to solve "the matrix" problem.Enabling other editors to have their own org-mode would be a logical next step.
CLI tools. I'd love to get integration withTaskWarriorand maybe even use Org as TaskWarrior's DOM.
Any contributions are welcome. If you want to help check outcontribution guide.