Marcin Borkowski <mb...@mbork.pl> writes: > and thanks for your answer. I never thought about analyzing agenda > /output/ - that is quite clever! I still think it's a hack, and > I really regret that Org does not offer a programmer a better API for > agenda (and many other things) - there could be a lot of applications > built on top of Org with that. I'll definitely try this solution some > day (maybe even within a few days).
It kind of is a hack, but at the same time, Org itself is kind of a really big hack on top of Emacs, outline-mode, and plain text files. :) There are some examples of attempts at better APIs (e.g. my PoC org-agenda-ng code, Remy Honig's <https://github.com/remyhonig/org-query>, and some other people's personal configs here and there), but I'm guessing they all suffer from Emacs's function call overhead. IIUC the agenda is as fast as it is because of the way it's largely written in large functions. :) An idea I had recently was to make more use of inline functions, defsubst, etc, to avoid that. It might let us make the code more functional while letting the byte-compiler optimize it. At the same time, I wonder why it isn't already that way--maybe better Emacs programmers know why it wouldn't be a good idea. I see Tom Tromey is still working on <https://github.com/tromey/el-compilador/>. Imagine how fast Org would be if it could be compiled into native code! We can dream, I guess...