← Back to context

Comment by yewenjie

3 years ago

I know HN loves org-mode, and so I, but goddamn it, it is 2023 and there still no sane good-enough parser for org-mode?

I'd love an LSP-mode for org. But that may be difficult, because the formal grammar is quite vast. ref:

A formal grammar for Org: https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg...

  • There is a tree-sitter parser in the works and neovim plugin is already using it.

    I think that makes more sense than full blown LSP.

    • True, but why not wish for the whole kitchen sink? :)

      But on a more serious note, would you agree that an LSP server at par with Emacs Org Mode will validate the sufficiency of a standard grammar?

      That in turn will allow all sorts of apps to bloom. Right now everyone is having to roll their own for whatever subset of org they choose to support. And the fact of having to roll one's own is the limiting factor for feature support. Which isn't terrible, because partial compatibility can work just fine.

It is in the workings, since the grammar was separated out. All other tools are free to implement a parser. It takes time and interest of people developing other tools. I think there is at least some development going on to have good org-mode support in VIM.

I was honestly impressed when I started writing my blog posts in org-mode for Hugo, and accidentally placed the .org file in my content directory, forgot to export it to Markdown, and it actually showed up on my blog. I was like "surely I must've rendered it and forgot" but nope, it just reads basic .org files on its own. Kinda neat.

Python has a decent one. For people who like orgmode, python and jinja2, I built a command line templater using it:

https://hitchdev.com/orji/

I use to to generate nicely formatted latex letters, resume, markdown for uploading to a website, etc.