From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Is there a way to get all agenda TODOs programmatically? Date: Sat, 07 Oct 2017 09:20:26 -0500 Message-ID: <87a813rqdx.fsf@fastmail.fm> References: <87376v36up.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0pxw-0007cB-8w for emacs-orgmode@gnu.org; Sat, 07 Oct 2017 10:20:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0pxt-0003CI-4U for emacs-orgmode@gnu.org; Sat, 07 Oct 2017 10:20:32 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:48513) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e0pxs-0003Bu-Ne for emacs-orgmode@gnu.org; Sat, 07 Oct 2017 10:20:29 -0400 In-Reply-To: <87376v36up.fsf@mbork.pl> (Marcin Borkowski's message of "Sat, 07 Oct 2017 06:43:58 +0200") 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: Marcin Borkowski Cc: Org-Mode mailing list Hi Marcin, Marcin Borkowski writes: > I'd like to get a list of all agenda TODOs, with titles and due dates. > Is there something ready in Org/contrib/blogosphere to help me? This functionality is built into org-mode. The simplest way to get such a list is to use the agenda (specifically M-x org-todo-list). To display scheduling information you can customize the variable org-agenda-prefix-format. > The problem I'm trying to solve is to make some kind of a metric of how > I'm doing with my TODO list, like "how many overdue tasks do I have", or > even better, such a sum weighted by the time after the deadline, or > something similar. If you use the "DEADLINE" keyword (M-x org-deadline, bound to C-c C-d), then the daily/weekly agenda (M-x org-agenda-list) will display any overdue tasks. Finally, if you want simply to gather the todo data programmatically for further processing you can use the function org-map-entries. Best, Matt