From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Is there a way to get all agenda TODOs programmatically? Date: Wed, 03 Jan 2018 15:15:49 +0100 Message-ID: <874lo3f2p6.fsf@nicolasgoaziou.fr> 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> <87vagjtgom.fsf@alphapapa.net> <87po6rt76o.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWjpk-0001Zz-Hp for emacs-orgmode@gnu.org; Wed, 03 Jan 2018 09:15:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWjpg-0002Y0-E6 for emacs-orgmode@gnu.org; Wed, 03 Jan 2018 09:15:56 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:52101) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eWjpg-0002XF-7G for emacs-orgmode@gnu.org; Wed, 03 Jan 2018 09:15:52 -0500 In-Reply-To: <87po6rt76o.fsf@alphapapa.net> (Adam Porter's message of "Wed, 03 Jan 2018 07:15:11 -0600") 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: Adam Porter Cc: emacs-orgmode@gnu.org Hello, Adam Porter writes: > I have some more code you might find useful. I had an idea to take a > different approach with my org-agenda-ng code (not using org-element to > parse the whole buffer first), and it seems to be working well so far. Clearly, `org-element-parse-buffer' is not adequate for the task. When buildings the agenda view, you're most probably interested in very specific parts of the document, whereas Element tries to be as thorough as possible. I suggest even to not use any org-element-* function there. > The code is here: > > https://github.com/alphapapa/org-agenda-ng/tree/non-element-parsing > > The code doesn't generate an identical result to the org-agenda code > (not yet, anyway), but it's very similar. It lacks the agenda prefix > feature and full application of agenda faces (it does do a few faces > already). Most, if not all, text properties are applied. And of > course, more work could be done to make it look more like an official > agenda buffer. I don't want to sound offending, but your 400 locs library cannot possibly be "very similar" to 10k locs org-agenda.el. Also, after a cursory look, it is not clear how you solve the multi-days issue. I.e., AFAIU, you still run multiple checks on the same entry. Nevertheless, I think your approach is right. I think that, at some point, we'll need to rewrite "org-agenda.el" from scratch, like we did for "org-export.el" a few years back, so it becomes manageable again. In the process, we definitely need to find a better replacement for `org-agenda-skip', as done in your library. So, in a nutshell, I think you're doing a step in the right direction. I hope Org can ultimately benefit from a better "org-agenda.el". My 2 cents, Regards, -- Nicolas Goaziou