From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: Is there a way to get all agenda TODOs programmatically? Date: Wed, 03 Jan 2018 03:50:01 -0600 Message-ID: <87vagjtgom.fsf@alphapapa.net> References: <87376v36up.fsf@mbork.pl> <87a813rqdx.fsf@fastmail.fm> <87r2ue29j8.fsf@mbork.pl> <874lrasxu2.fsf@fastmail.fm> <877et5joln.fsf@mbork.pl> <87shbqv58k.fsf@alphapapa.net> <87vagjffuq.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWfgj-0000ju-TT for emacs-orgmode@gnu.org; Wed, 03 Jan 2018 04:50:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWfgf-0006aI-DV for emacs-orgmode@gnu.org; Wed, 03 Jan 2018 04:50:21 -0500 Received: from [195.159.176.226] (port=37206 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWfgf-0006YL-0L for emacs-orgmode@gnu.org; Wed, 03 Jan 2018 04:50:17 -0500 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eWfeX-00078j-Ox for emacs-orgmode@gnu.org; Wed, 03 Jan 2018 10:48:05 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Marcin Borkowski 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 , 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 . Imagine how fast Org would be if it could be compiled into native code! We can dream, I guess...