emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Is there a way to get all agenda TODOs programmatically?


From: Marcin Borkowski
Subject: Re: [O] Is there a way to get all agenda TODOs programmatically?
Date: Fri, 29 Dec 2017 20:55:32 +0100
User-agent: mu4e 0.9.19; emacs 27.0.50

On 2017-10-07, at 18:54, Matt Lundin <address@hidden> wrote:

>>> Finally, if you want simply to gather the todo data programmatically for
>>> further processing you can use the function org-map-entries.
>>
>> Thanks, that seems to be a good pointer.  I'll check it out.
>
> I think something like this would generate a such a list:
>
> (org-map-entries '(cons (nth 4 (org-heading-components))
>                          (list (org-get-deadline-time nil)))
>                   "/!TODO" 'agenda)
>
> Each item in the list would look something like this:
>
> ("Test" (23000 24400))
>
> You could then feed the list to whatever function you'd like.

Thanks again.  I played around with this for some time, but there is one
problem.  The agenda has a lot of settings, and replicating them with
org-map-entries turned out to be no fun.

Is there a way to plug into the agenda generating functions somehow to
get a Lisp list of agenda items?  I'm pretty sure that can be done -
org-super-agenda does something similar, after all - but I have no idea
why.  I could delve into agenda source myself, but is is quite hairy, so
maybe someone knows that already?

TIA,

-- 
Marcin Borkowski



reply via email to

[Prev in Thread] Current Thread [Next in Thread]