[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Positive experience with org-element API

From: Adr ien
Subject: Positive experience with org-element API
Date: Mon, 6 Apr 2020 14:11:11 -0400

Hi everyone,
I just wanted to share a recent positive experience I had with org-mode, specifically with org-mode parsing in elisp.

I maintain a package that allows users to write curl request in org mode and execute them. At first, I defined a structure for that org entry that I was parsing via a series of regex into an alist. But as features grew and the structure evolved, it was becoming incredibly difficult and hacky to parse that way. Thankfully, after spending a bit of time with the org-element API doc and getting some much needed help on the IRC channel, I was able to replace the hacky regex with a cleaner and more robust mechanism taking full advantage of `org-element-map`.

In case you are interested in the code, you can see a sample org entry here:
and the parsing code here:

It definitely could me optimized but I am quite happy with it already.
Thanks again to everyone for the help and the doc!
Adrien Brochard

reply via email to

[Prev in Thread] Current Thread [Next in Thread]