Marcin Borkowski <mb...@mbork.pl> writes: > On 2017-10-07, at 16:20, Matt Lundin <m...@imapmail.org> wrote: > >> Hi Marcin, >> >> Marcin Borkowski <mb...@mbork.pl> 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. > > I know (and use) that. What I want is not /display/, but a /data > structure/ containing that info.
Ah, I see! A lisp list, not a list on the screen. >> 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. Best, Matt