by geokon · 2y ago · 0 comments
Alternatives like Asciidoc are not perfect, esp for literate programming, b/c it's also kinda complex and so it also only has one backend (that's runnable from Clojure through JRuby!). I imagine a simpler multi-backend solution like Djot will be the future most likely. Bloated underspeced markups are on the way out.
If I wanted to emulate a fraction of org-mode features I use daily in markdown, I would have to use Obsidian with a bunch of plugins, and we would end up in same boat.
I don't know the exact spec situation, but I know that comprehensive parsing libraries in modern non-elisp languages exist. An org-mode contributor has one in Julia[1], another in Dart[2] that powers a Flutter app, and there are many tree-sitter grammar based tools that are useable from neovim (e.g. [3]). The basic org2html or org2pdf CLI needs are already addressed by Pandoc.
[1] https://github.com/tecosaur/Org.jl
Would it be neat to have an alternate complete implementation of org-mode elsewhere? Sure. But unlike say Photoshop, Emacs is already open and extremely hackable. That mitigates most of the reasons you would want to.
Org is hardly more tied up to the editor than any of the many other formats people use – all of these have more or less complete editor support depending on what features you need (e.g. if you start doing fancy literate programming in markdown, or azathoth forbid, try commenting out lines, you'll find spotty support in at least some of the existing implementations). And if you like the full combination of features that Emacs+Org gives you, you'll be hard pressed to find another environment to replace that, so ... why bother?
(OTOH if you only need some minor part, like html export, and you have to work with people already using other formats, then those other formats might be better.)
Because I don't like emacs and I wanted to lean on command line apps for getting data into and out of my orgzly org-mode electronic brain, I've been doing this by combining orgmode with jinja2 (I do this with a cli app I wrote called 'orji').
I think it's a very powerful combination. I use it to generate latex/html/whatever and short bash scripts which are then run. E.g.
* Generate my CV using a latex CV template I found on overleaf that I converted into a jinja2 template.
* Send the contents of a TODO note tagged 'sendemail' as an email with a tiny templated bash script.
* Create jira ticket with the details of a note.
* Generate reveal.js presentations.
All from my phone, using orgzly and one big button which runs a single termux script that seeks out TODO notes with labels (e.g. cv/sendemail) that match the scripts in my library (cv.sh / sendemail.sh).
jinja2 certainly has the capability to end up creating a huge old mess if you abuse it, especially to generate code, but I find that using it to template tiny 5-6 line bash scripts or a latex or an HTML file hits a sweet spot of usability and flexibility.
For better or worse, Org Mode is a feature-rich application, and org mode format is markup tied to that application. Using it as general-purpose markup is kind of a nice side effect of it being plaintext, and that even the portable subset is more feature-rich than most markup alternatives.
For full compatibility, you'd have to port Org Mode to different editors, in the same way you'd port a native app between OS-es. Org Mode is very much an application that's making full use of its platform's specific features and APIs, except here the platform isn't Windows/Win32 API, but Emacs/Elisp.
My favorite is Org Babel (jupyter notebooks on steroids) that can be used for literate programming that you mentioned (reproducible research, devops-y tasks).
Publishing is just one of many applications. There are certainly cases where you might want a more specialized tool.
It's true that Emacs is the canonical Org-Mode compiler, but there are many other compilers, including Github pages. If it's typesetting you want, the support is widely available. If it is org-mode-powered workflows (like TODOs etc.), then support outside of Emacs is narrower, but still quite serviceable [3].
---
[1] built with OrgMode and pandoc: https://www.evalapply.org/
[2] pandoc as compiler FTW. https://github.com/adityaathalye/shite/blob/b4163b566f0708fd...
__shite_templating_compile_source_to_html() {
# If content has front matter metadata, it is presumed to be in a format
# that the content compiler can safely process and elide or ignore.
local file_type=${1:?"Fail. We expect file type of content like html, org, md etc."}
case ${file_type} in
html )
cat -
;;
md )
pandoc -f markdown -t html
;;
org )
pandoc -f org -t html
;;
esac
}
[3] Not just Emacs... https://www.evalapply.org/posts/why-and-how-i-use-org-mode/i...