emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to extract TODOs from date-tree
@ 2014-10-28 15:53 Jay Iyer
  2014-10-28 16:20 ` Thorsten Jolitz
  2014-10-28 16:54 ` Jay Iyer
  0 siblings, 2 replies; 13+ messages in thread
From: Jay Iyer @ 2014-10-28 15:53 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 747 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-28 15:53 How to extract TODOs from date-tree Jay Iyer
@ 2014-10-28 16:20 ` Thorsten Jolitz
  2014-10-28 16:54 ` Jay Iyer
  1 sibling, 0 replies; 13+ messages in thread
From: Thorsten Jolitz @ 2014-10-28 16:20 UTC (permalink / raw)
  To: emacs-orgmode

Jay Iyer <jayiyer09@gmail.com> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-28 15:53 How to extract TODOs from date-tree Jay Iyer
  2014-10-28 16:20 ` Thorsten Jolitz
@ 2014-10-28 16:54 ` Jay Iyer
  2014-10-28 17:26   ` Thorsten Jolitz
                     ` (2 more replies)
  1 sibling, 3 replies; 13+ messages in thread
From: Jay Iyer @ 2014-10-28 16:54 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2210 bytes --]

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 <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 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 <jayiyer09@gmail.com> 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
>

[-- Attachment #2: Type: text/html, Size: 3420 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-28 16:54 ` Jay Iyer
@ 2014-10-28 17:26   ` Thorsten Jolitz
  2014-10-28 17:28   ` Thorsten Jolitz
  2014-10-29 15:28   ` Jay Iyer
  2 siblings, 0 replies; 13+ messages in thread
From: Thorsten Jolitz @ 2014-10-28 17:26 UTC (permalink / raw)
  To: emacs-orgmode

Jay Iyer <jayiyer09@gmail.com> writes:

Hi Jay,

> 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:

puh ... it would of cause be possible to write emacs lisp to find, extract
and process the date info from the parent tree's :raw-value, but I must
admit I don't want to do it, since it is just extra work required by
un-idiomatic use of Org-mode. 

You have all the means to create a nice logical project file out-of-the
box with Org-mode, use tags, timestamps, deadlines, properties etc and
then extract selected info via the agenda. 

Otherwise you need to write custom elisp yourself or find somebody who
does it for you ...

> 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 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-28 16:54 ` Jay Iyer
  2014-10-28 17:26   ` Thorsten Jolitz
@ 2014-10-28 17:28   ` Thorsten Jolitz
  2014-10-29  2:59     ` Nick Dokos
  2014-10-29 15:28   ` Jay Iyer
  2 siblings, 1 reply; 13+ messages in thread
From: Thorsten Jolitz @ 2014-10-28 17:28 UTC (permalink / raw)
  To: emacs-orgmode

Jay Iyer <jayiyer09@gmail.com> 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 ...

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-28 17:28   ` Thorsten Jolitz
@ 2014-10-29  2:59     ` Nick Dokos
  2014-10-29  8:24       ` Detlef Steuer
  2014-10-29 12:27       ` Alexander Baier
  0 siblings, 2 replies; 13+ messages in thread
From: Nick Dokos @ 2014-10-29  2:59 UTC (permalink / raw)
  To: emacs-orgmode

Thorsten Jolitz <tjolitz@gmail.com> writes:

> Jay Iyer <jayiyer09@gmail.com> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-29  2:59     ` Nick Dokos
@ 2014-10-29  8:24       ` Detlef Steuer
  2014-10-29 12:20         ` Nick Dokos
  2014-10-29 12:27       ` Alexander Baier
  1 sibling, 1 reply; 13+ messages in thread
From: Detlef Steuer @ 2014-10-29  8:24 UTC (permalink / raw)
  To: emacs-orgmode

Hi Nick!


> 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.
> 


Oh, NO, don´t do that! Datetrees were a major enhancement for my
workflow. I use one as a kind  of "lab logbook" and time tracker.

Fits my use very well and I would miss it a lot!

I think datetrees work like intended and stable.

Regards
Detlef

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-29  8:24       ` Detlef Steuer
@ 2014-10-29 12:20         ` Nick Dokos
  2014-10-29 15:15           ` Detlef Steuer
  0 siblings, 1 reply; 13+ messages in thread
From: Nick Dokos @ 2014-10-29 12:20 UTC (permalink / raw)
  To: emacs-orgmode

Detlef Steuer <detlef.steuer@gmx.de> writes:

> Hi Nick!
>
>
>> 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.
>> 
>
>
> Oh, NO, don´t do that! Datetrees were a major enhancement for my
> workflow. I use one as a kind  of "lab logbook" and time tracker.
>
> Fits my use very well and I would miss it a lot!
>
> I think datetrees work like intended and stable.
>

Yes, that was a bit provocative, wasn't it? I don't think there is
any need to worry.

Could you describe your use case? Maybe it could fill the hole in the
manual. Also, maybe my impression that it's thinly supported may be
wrong, but you would know better: is there datetree functionality that
you find yourself wishing for?

-- 
Nick

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-29  2:59     ` Nick Dokos
  2014-10-29  8:24       ` Detlef Steuer
@ 2014-10-29 12:27       ` Alexander Baier
  1 sibling, 0 replies; 13+ messages in thread
From: Alexander Baier @ 2014-10-29 12:27 UTC (permalink / raw)
  To: Nick Dokos; +Cc: emacs-orgmode

On 2014-10-29 03:59 Nick Dokos wrote:
> 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.

I would argue that datetress lend themselves fairly well for browsing
any kind of chronologically organized data, without the need to resort
to any external tool. No agenda, no sparse-trees, no nothing. If you
have to, you can just look at the plain text/org file and browse it
pretty comfortably.

Regards,
-- 
Alexander Baier

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-29 12:20         ` Nick Dokos
@ 2014-10-29 15:15           ` Detlef Steuer
  0 siblings, 0 replies; 13+ messages in thread
From: Detlef Steuer @ 2014-10-29 15:15 UTC (permalink / raw)
  To: emacs-orgmode

Am Wed, 29 Oct 2014 08:20:47 -0400
schrieb Nick Dokos <ndokos@gmail.com>:

> Detlef Steuer <detlef.steuer@gmx.de> writes:
> 
> > Hi Nick!
> >
> >
> >> 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.
> >> 
> >
> >
> > Oh, NO, don´t do that! Datetrees were a major enhancement for my
> > workflow. I use one as a kind  of "lab logbook" and time tracker.
> >
> > Fits my use very well and I would miss it a lot!
> >
> > I think datetrees work like intended and stable.
> >
> 
> Yes, that was a bit provocative, wasn't it? I don't think there is
> any need to worry.
> 
> Could you describe your use case?

Nothing to see here: Just hitting C-c a a i j a few times during a day 
and add some notes for today in a diary/logbook. That's it. 

I'm quite happy about the status quo.

Detlef

> Maybe it could fill the hole in the
> manual. Also, maybe my impression that it's thinly supported may be
> wrong, but you would know better: is there datetree functionality that
> you find yourself wishing for?
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-28 16:54 ` Jay Iyer
  2014-10-28 17:26   ` Thorsten Jolitz
  2014-10-28 17:28   ` Thorsten Jolitz
@ 2014-10-29 15:28   ` Jay Iyer
  2014-10-29 19:34     ` Robert Horn
  2 siblings, 1 reply; 13+ messages in thread
From: Jay Iyer @ 2014-10-29 15:28 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 4048 bytes --]

Thorsten Jolitz <address@hidden> writes:

>* Jay Iyer <address@hidden> 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 <jayiyer09@gmail.com> 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 <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 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 <jayiyer09@gmail.com> 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
>>
>
>

[-- Attachment #2: Type: text/html, Size: 5960 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-29 15:28   ` Jay Iyer
@ 2014-10-29 19:34     ` Robert Horn
  2014-11-02 21:00       ` Alan Schmitt
  0 siblings, 1 reply; 13+ messages in thread
From: Robert Horn @ 2014-10-29 19:34 UTC (permalink / raw)
  To: Jay Iyer; +Cc: emacs-orgmode


Jay Iyer writes:

> 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.

It's most definitely useful.  I'm not sure what you think would be
"better".  I make extensive use of date tree for maintaining various log
book journals.  I've got various capture templates set up so that the
two characters: F* <char> take me to the right file and date tree.  I
type in the note, then C-c C-c takes me back where I had been
previously.  The template capures the date and time for the note, plus
other context information per the template.  This creates very nice time
tagged logs.

The only gap that I see, and it's minor, is that there is just one date
tree per file.  

R Horn

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: How to extract TODOs from date-tree
  2014-10-29 19:34     ` Robert Horn
@ 2014-11-02 21:00       ` Alan Schmitt
  0 siblings, 0 replies; 13+ messages in thread
From: Alan Schmitt @ 2014-11-02 21:00 UTC (permalink / raw)
  To: Robert Horn; +Cc: emacs-orgmode, Jay Iyer

[-- Attachment #1: Type: text/plain, Size: 1794 bytes --]

On 2014-10-29 15:34, Robert Horn <rjhorn@alum.mit.edu> writes:

> Jay Iyer writes:
>
>> 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.
>
> It's most definitely useful.  I'm not sure what you think would be
> "better".  I make extensive use of date tree for maintaining various log
> book journals.  I've got various capture templates set up so that the
> two characters: F* <char> take me to the right file and date tree.  I
> type in the note, then C-c C-c takes me back where I had been
> previously.  The template capures the date and time for the note, plus
> other context information per the template.  This creates very nice time
> tagged logs.

I also use datetrees regularly. I have this in my capture templates:

#+begin_src emacs-lisp
(setq org-capture-templates
      (quote
        ("o" "Old Journal" entry (file+datetree+prompt "diary-runx.org")
         "* %i%?")
        ("O" "Old Journal with link" entry (file+datetree+prompt "diary-runx.org")
         "* %i%?\n%a")
        ("j" "Journal" entry (file+datetree "diary-runx.org")
         "* %?\nEntered on %U\n  %i")
        ("J" "Journal with link" entry (file+datetree "diary-runx.org")
         "* %?\nEntered on %U\n  %i\n  %a")))
#+end_src

Typical usage for a trivial topic: I watch a movie that I like, I write
a quick review in movies.org, I mark the title of the movie, and capture
with 'J'. It gives me an entry with the highlighted title and a link to
the review.

Less trivial usage: as a meeting start, I start a capture with 'j', and
C-u C-c C-c to jump to the diary file where I can take notes.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-11-02 21:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 15:53 How to extract TODOs from date-tree Jay Iyer
2014-10-28 16:20 ` Thorsten Jolitz
2014-10-28 16:54 ` Jay Iyer
2014-10-28 17:26   ` Thorsten Jolitz
2014-10-28 17:28   ` Thorsten Jolitz
2014-10-29  2:59     ` Nick Dokos
2014-10-29  8:24       ` Detlef Steuer
2014-10-29 12:20         ` Nick Dokos
2014-10-29 15:15           ` Detlef Steuer
2014-10-29 12:27       ` Alexander Baier
2014-10-29 15:28   ` Jay Iyer
2014-10-29 19:34     ` Robert Horn
2014-11-02 21:00       ` Alan Schmitt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).