From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Iyer Subject: Re: How to extract TODOs from date-tree Date: Tue, 28 Oct 2014 09:54:02 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c36474884cfe05067e7ea9 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjA22-0006Zz-S1 for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 12:54:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjA20-0005fF-JX for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 12:54:06 -0400 Received: from mail-la0-x229.google.com ([2a00:1450:4010:c03::229]:53633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjA20-0005ep-5n for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 12:54:04 -0400 Received: by mail-la0-f41.google.com with SMTP id pn19so1020119lab.0 for ; Tue, 28 Oct 2014 09:54:02 -0700 (PDT) In-Reply-To: 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 --001a11c36474884cfe05067e7ea9 Content-Type: text/plain; charset=UTF-8 Hi Thorsten, The file entries are as follows and the task/note/project sub-heads generally don't have active/inactive timestamps except when a scheduling/deadline is specified. Thanks. ** 2014-10 October *** 2014-10-01 Wednesday **** TODO first task **** General note entry **** Project :prj: Jay Iyer writes: Hi, >* I have my Org files set up as date-trees containing a mix of notes,* >* tasks and projects. I now have a need to generate a list of projects* >* and tasks filed under specific date-tree or in a range of dates. Is it* >* possible to get this listing from the date-trees if the entries* >* themselves don't have date/time in timestamps or in properties* >* settings? I couldn't find a solution in the archives. Please advise.* >* Thank you.* what is a date tree? This: ,---- | * <2014-10-28 Di> `---- ? If the date-tree is the parent and has a timestamp, then the entries are part of the contents of parent, and you can use this function to map over the parents ,----[ C-h f org-element-map RET ] | org-element-map is a compiled Lisp function in `org-element.el'. | | (org-element-map DATA TYPES FUN &optional INFO FIRST-MATCH | NO-RECURSION WITH-AFFILIATED) | | Map a function on selected elements or objects. [...] `---- and this to get their contents ,----[ C-h f org-element-contents RET ] | org-element-contents is a compiled Lisp function in `org-element.el'. | | (org-element-contents ELEMENT) | | Extract contents from an ELEMENT. `---- and then 'org-element-property' and 'org-element-put-property' to get and set timestamp info from the parent and any other info from the child entries. -- cheers, Thorsten On Tue, Oct 28, 2014 at 8:53 AM, Jay Iyer wrote: > Hi, > I have my Org files set up as date-trees containing a mix of notes, tasks > and projects. I now have a need to generate a list of projects and tasks > filed under specific date-tree or in a range of dates. Is it possible to > get this listing from the date-trees if the entries themselves don't have > date/time in timestamps or in properties settings? I couldn't find a > solution in the archives. Please advise. > Thank you. > -jay > --001a11c36474884cfe05067e7ea9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Thorsten,
The file entries are as follows and the task/note/projec=
t sub-heads generally don't have active/inactive timestamps except when=
 a scheduling/deadline is specified.  Thanks.
** 2014-10 October
*** 2014-10=
-01 Wednesday
**** TODO first task
**** General note entry
**** Project                  :prj:

Jay Iyer &l=
t;address@hidden> writes:

Hi,
> I have my Org files set up as date-trees containing a mix of notes,=

> tasks and projects. I now have a need to generate a list of project=
s
> and tasks filed under specific date-tree or in a range of dates. Is=
 it
> possible to get this listing from the date-trees if the entries
> themselves don't have date/time in timestamps or in properties<=
/i>
> settings? I couldn't find a solution in the archives. Please ad=
vise.
> Thank you.

what is a date tree? This:

,----
| *  <2014-10-28 Di>
`----

?

If the date-tree is the parent and has a timestamp, then the entries
are part of the contents of parent, and you can use this function to
map over the parents

,----[ C-h f org-element-map RET ]
| org-element-map is a compiled Lisp function in `org-element.el'.
|=20
| (org-element-map DATA TYPES FUN &optional INFO FIRST-MATCH
| NO-RECURSION WITH-AFFILIATED)
|=20
| Map a function on selected elements or objects. [...]
`----

and this to get their contents

,----[ C-h f org-element-contents RET ]
| org-element-contents is a compiled Lisp function in `org-element.el'.
|=20
| (org-element-contents ELEMENT)
|=20
| Extract contents from an ELEMENT.
`----

and then 'org-element-property' and 'org-element-put-property&#=
39; to get
and set timestamp info from the parent and any other info from the child
entries.

--=20
cheers,
Thorsten


On Tue, Oct 28, 2014 at 8:53 AM, Jay Iyer <jayiyer09@gm= ail.com> wrote:
Hi,
I have my Org files set up as date-trees containing a mix of notes, ta= sks and projects.=C2=A0 I now have a need to generate a list of projects an= d tasks filed under specific date-tree or in a range of dates.=C2=A0 Is it = possible to get this listing from the date-trees if the entries themselves = don't have date/time in timestamps or in properties settings?=C2=A0 I c= ouldn't find a solution in the archives.=C2=A0 Please advise.
Thank you= .
-jay

--001a11c36474884cfe05067e7ea9--