← Back to context

Comment by least

1 day ago

Babel features are kind of a moot point if you’re just talking about the syntax, which seems to be the purpose of the post. Most of the reason to use org mode is tied to emacs.

There’s no reason you couldn’t do something similar with markdown code blocks if someone were so inclined. But that’s tool dependent, not syntax.

I sort of agree with Karl’s point about there being too many standards of markdown, but I doubt org mode would have survived the same level of popularity without suffering the same fate.

It doesn’t help that there is no standard for org mode. You can only really use and take advantage of its power in emacs. It isn’t susceptible to lossy transformations because there’s only one real org mode editor.

Well, but I am not aware of anyone having come up with a good syntax to do babel things in Markdown. Markdown and Org Mode also set out to serve different purposes. For a quick and dirty text Markdown might suffice, but the babel stuff and spreadsheet stuff enable a lot of use cases that Markdown simply doesn't cater to. We already have the implementation of all these nice things in Emacs. If we were to replicate them for some markdown dialect, they would probably be done half-right, before someone actually manages to get literate programming right for various languages, including what code to translate to, how to wrap or not wrap the code that is inside blocks, sessions, output formats, etc. We might as well use what we have with Emacs. There is probably a way to call Emacs' functionality from outside of Emacs, to treat it as a library.

But not all is well with Org Mode syntax either. Many git hosters have only a very rudimentary implementation of a parser and writing a parser for it is not actually that easy. Its dynamic nature requires at least a 2 step approach of parsing and then later checking all kinds of definitions at the top of a file and further processing the document according to that. It's power comes at that cost. That's probably why we have so many Markdowns, but only one Org Mode (OK maybe a few, counting Vim and VSCodium plugins, that achieve a feature subset).

I will say though, that org mode syntax is much better suited for writing technical documentation than markdown. The only issue is, that not so many people know it or want to learn it, and I don't know a way to change that. Perhaps that effort to have the org mode syntax separately defined (https://gitlab.com/publicvoit/orgdown/-/blob/master/doc/Over...) by the same author will help creating more support for the format in various tools.

  • I agree you would need to specify the markdown to allow more implementations. https://github.com/jgm/djot Would make a good DSL inside languages, combine that with compile-time execution so that blocks can auto-recalculate and you have a more available mechanism than emacs/org in other languages.