From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: get all todo items as lisp list Date: Sun, 19 Feb 2012 08:28:14 +0800 Message-ID: <87vcn3wtsx.fsf@ericabrahamsen.net> References: <87wr7krqd9.fsf@micropit.couberia.bzh> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ryude-0004Ul-J5 for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 19:28:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ryudd-0001Sh-GN for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 19:28:26 -0500 Received: from plane.gmane.org ([80.91.229.3]:57131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ryudd-0001Sb-52 for emacs-orgmode@gnu.org; Sat, 18 Feb 2012 19:28:25 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ryudc-0004Cv-Dm for emacs-orgmode@gnu.org; Sun, 19 Feb 2012 01:28:24 +0100 Received: from 114.250.104.166 ([114.250.104.166]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Feb 2012 01:28:24 +0100 Received: from eric by 114.250.104.166 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Feb 2012 01:28:24 +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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On Sun, Feb 19 2012, Peter Münster wrote: > Hi, > > Given a todo list in an org file, is there already a function, that > converts this list to an elisp list, that contains at least heading, > deadline and properties? > > Example input: > * TODO todo-test > DEADLINE: <2012-04-19 Thu 13:33> > :PROPERTIES: > :notify: notify-test > :END: > * TODO todo-test2 > DEADLINE: <2012-05-20 Sun 16:66> > :PROPERTIES: > :notify: notify-test2 > :END: > > Example output: > ((file "test.org" heading "TODO todo-test" deadline (111 222 333) > properties (notify notify-test)) > (file "test.org" heading "TODO todo-test2" deadline (123 456 789) > properties (notify notify-test2))) > > Or are there functions, that could help me, to do it myself? > (I've tried with `org-agenda-get-day-entries', but without success...) Hi, If you load org-element.el from contrib/, I think the function `org-element-parse-buffer' does what you want (and probably a whole lot more). Eric -- GNU Emacs 24.0.93.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-02-16 on pellet Org-mode version 7.8.03 (release_7.8.03.362.g1cc2)