← Back to context

Comment by iLemming

2 months ago

> I really wish org-mode and org-roam's functions were callable outside of emacs

What are you even talking about? It's like wishing for java programs to be able to execute without JVM, or Erlang-code without BEAM. While that's theoretically possible to a certain degree (using Graal and Lumen), it's not easily achievable.

Org-mode is written in Elisp, of course it needs Emacs to run. You just need Emacs executable and you can absolutely run scripts in batch mode. I have done it many times, running tests on GitHub Actions, etc.

I thought I was pretty clear? It would be nice to be able to call functions from org-mode and its related packages without having Emacs installed, or with some minimal subset of emacs meant for the commandline which caters to the needs of people running headless commands. It would solve a whole ton of issues for me. In particular, org-roam-ui is amazing. To run it, I have to open emacs and then... have emacs launch it into a browser for me. But the hosted interface won't export to anything that can be statically (or dynamically, really) hosted, so I can never access this awesome note-viewing interface from the web, even though to do it locally I already have to use a browser?

I have a project for hosting org-roam-ui as a website that took a ton of finagling to figure out and is extremely brittle. I had to finally load a custom .el script to prepare emacs to even try to evaluate the 'org-roam-ui' command from the commandline. If emacs prioritized headless / cli operations, this wouldn't have been such a nightmare, but it absolutely was. Just finding the right ports and re-assigning them to get out of each others way was a huge learning curve even for a seasoned emacs-er.

> It's like wishing for java programs to be able to execute without JVM, or Erlang-code without BEAM

No, it's not. It's wishing for basic functionality offered by all other markup languages of which I'm aware. That includes latex and everything supported by pandoc. Org-mode can do all sorts of crazy rendering tasks from its files, and it is worse than pulling teeth to get that functionality into a build pipeline of any kind.

"What are you even talking about?"

Not understanding something is not a virtue, not something to act smug and superior about.

"It's like wishing for java programs to be able to execute without JVM, or Erlang-code without BEAM."

No, it's not like that.

"Org-mode is written in Elisp, of course it needs Emacs to run."

There are (incomplete of course) apps outside of emacs and elisp that process org-mode files. And even if there weren't, it makes sense to wish that there were. In the mind of a clear and competent thinker, the mere fact that org-mode needs emacs to run is not a reason not to wish it weren't.

  • > Not understanding something is not a virtue, not something to act smug and superior about.

    I'm sorry that I sounded like acting smug, I'm honestly just trying to understand what you're wishing for. An external (non-elisp) org-mode parser or something? I don't get your last paragraph in your latest response, like at all.