4 ms·
Long time (mostly ex-) org-mode user here. Org-mode is incredibly capable, but it's often not the best tool. The last time I used active code blocks in org-mode
by whacked_new 5y ago
Long time (mostly ex-) org-mode user here. Org-mode is incredibly capable, but it's often not the best tool. The last time I used active code blocks in org-mode, it was for reading headings from the org file's TODOs to create an at-a-glance summary table of completion state.
It's super interactive because you're executing code on the very same file where it's written, but tightly couples the functionality Emacs, and adds irrelevant content (code) into the file. It also requires you debug, which can become a huge distraction from what is a simple goal. You also have to remember to run the sync code block, unless you have a method of auto-running the code or use another mechanism to remind yourself. Auto-sync is a whole other exercise.
The workflow stuff in the OP article looks completely doable in org-mode, but if we can see the difficulty in engineering the workflow system directly in emacs-lisp, and good choices exist for developing the system separately, then all of a sudden you're left wondering if Emacs + org-mode is actually the best client.
So now I mostly write markdown. That said, adding markdown code-fence execution to Emacs is surprisingly simple... you can send it to org's evaluate!
- kkfx 5y agoEmacs buffers are just buffers, not canvas, so dynamic information display is limited, but much can be done and it's already there (see Nicolas Rougier's Nano Emacs as a showcase). You can substitute for instance (push '("#+BEGIN_SRC" . "↦" ) prettify-symbols-alist) (push '("#+results:" . "") prettify-symbols-alist) (push '(":PROPERTIES:" . "") prettify-symbols-alist) (push '(":END:" . "") prettify-symbols-alist) you can avoid tags using in-property-drawer kev/value tagging, that's also easy to query with org-ql. A code block is run by a function as pretty anything and a function in Emacs can be called in countless way, like: - hitting a key - on file save with a hook - when certain conditions happens with a hook And that's in a global or file/buffer-local approach