3 ms·
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?
by yewenjie 4y 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?
- adityaathalye 4y agoI'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/msg00108.html https://lists.gnu.org/archive/html/emacs-orgmode/2021-04/msg...
- e3bc54b2 4y agoThere 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.
- adityaathalye 4y agoTrue, 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.
- natrys 4y agoThere is though: https://github.com/tecosaur/Org.jl https://github.com/tecosaur/Org.jl
- seanw444 4y agoJulia? Odd choice for that, but cool regardless.
- supernikio2 4y agoI've heard its parsing abilities are (almost) on par with Perl.
- seanw444 4y agoOh, I hadn't heard that. All I know is math guys really like it for some reason.
- seanw444 4y agoI 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.
- natrys 4y agoHugo uses go-org [1] which is pretty decent. I use that on its own in a pi for a lightweight webserver for my notes. [1] https://github.com/niklasfasching/go-org https://github.com/niklasfasching/go-org
- dotancohen 4y agoYour tag links (well, _the_ foss tag link) is missing a slash character, so the link is broken.
- seanw444 4y agoUh oh. Thanks for telling me. I decided to start my site over from scratch, so it's very barebones right now.
- hitchdev 4y agoPython has a decent one. For people who like orgmode, python and jinja2, I built a command line templater using it: https://hitchdev.com/orji/ https://hitchdev.com/orji/ I use to to generate nicely formatted latex letters, resume, markdown for uploading to a website, etc.
- zelphirkalt 4y agoIt 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.
- ParetoOptimal 4y agoI've used the Haskell one for some stuff: https://hackage.haskell.org/package/org-mode https://hackage.haskell.org/package/org-mode Sadly noweb tangling isn't very well implemented for any parsers I know of.