From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Iyer Subject: Re: How to extract TODOs from date-tree Date: Wed, 29 Oct 2014 08:28:45 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113462be6c56690506916b10 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjVB3-0007Hn-Bx for emacs-orgmode@gnu.org; Wed, 29 Oct 2014 11:28:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjVB1-0002FN-AP for emacs-orgmode@gnu.org; Wed, 29 Oct 2014 11:28:49 -0400 Received: from mail-lb0-x229.google.com ([2a00:1450:4010:c04::229]:54858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjVB0-0002FJ-Tj for emacs-orgmode@gnu.org; Wed, 29 Oct 2014 11:28:47 -0400 Received: by mail-lb0-f169.google.com with SMTP id l4so2700047lbv.28 for ; Wed, 29 Oct 2014 08:28:45 -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 --001a113462be6c56690506916b10 Content-Type: text/plain; charset=UTF-8 Thorsten Jolitz writes: >* Jay Iyer writes:* > >*> 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:* > >* I just read the term 'datetree' again in another post, maybe I'm not* >* up-to-date and it is idiomatic Org-mode use, then sorry for the noise ...* I don't think it's well documented (I couldn't find a reference in the manual) or well supported. org-capture does provide for it (see the doc for org-capture-templates) but afaict that's the only significant use of it - org-agend uses it for diary-related stuff and org-archive has to be able to archive it and that's it. The (rather thin) support for it is in org-datetree.el. If there are use cases out there, it might be worth collecting them and then thinking about how to support them better. If there aren't, maybe it should be thrown out. -- Nick I think removing support for date tree would be very disruptive, at least for me. Datetree is the fundamental structure of my Org files (I have two Org files: work and a personal journal) as I use capture templates for almost everything with the captured items filed neatly in the date trees and this structure provides a better sense of life flow for me. I rely on Agenda and sparse trees to extract the info/tasks/projects list. Please keep date tree intact. Thank you. -jay On Tue, Oct 28, 2014 at 9:54 AM, Jay Iyer wrote: > 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 >> > > --001a113462be6c56690506916b10 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thorsten Jolitz <address@hid=
den> writes:

> Jay Iyer <address@hidden> writes:
>
>> Hi Thorsten,
>> The file entries are as follows and the task/note/project sub-h=
eads 
>> 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:
>
> I just read the term 'datetree' again in another post, mayb=
e I'm not
> up-to-date and it is idiomatic Org-mode use, then sorry for the noi=
se ...

I don't think it's well documented (I couldn't find a reference=
 in the
manual) or well supported. org-capture does provide for it (see the doc
for org-capture-templates) but afaict that's the only significant use o=
f
it - org-agend uses it for diary-related stuff and org-archive has to be
able to archive it and that's it. The (rather thin) support for it is i=
n
org-datetree.el.

If there are use cases out there, it might be worth collecting them and
then thinking about how to support them better. If there aren't, maybe
it should be thrown out.

--=20
Nick

I think removing support for date tree would be very disruptive, a=
t least for me. Datetree is the fundamental structure of my Org files (I ha=
ve two Org files: work and a personal journal) as I use capture templates f=
or almost everything with the captured items filed neatly in the date trees=
 and this structure provides a better sense of life flow for me.  I rely on=
 Agenda and sparse trees to extract the info/tasks/projects list.  Please k=
eep date tree intact.  Thank you.
-jay=

On Tue, Oct 28, 2014 at 9:54 AM, Jay Iyer <jayiyer09@gmail.com><= /span> wrote:
Hi Thorsten,
The file=
 entries are as follows and the task/note/project sub-heads generally don&#=
39;t have active/inactive timestamps except when a scheduling/deadline is s=
pecified.  Thanks.
** 2014-10 October<=
/pre>
*** 2014-10-01 Wednesday
**** TODO first task
**** General note entry
**** Pr=
oject                  :prj:

Jay Iyer <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@gmail.com> wrote:
Hi,
I have my Org files set up as date-tre= es containing a mix of notes, tasks and projects.=C2=A0 I now have a need t= o generate a list of projects and tasks filed under specific date-tree or i= n 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 i= n properties settings?=C2=A0 I couldn't find a solution in the archives= .=C2=A0 Please advise.
Thank you.
-jay
<= /font>


--001a113462be6c56690506916b10--