emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* exporting just timestamped entries from an agenda
@ 2015-12-30  6:44 prayner
  2015-12-31  1:28 ` John Hendy
  0 siblings, 1 reply; 4+ messages in thread
From: prayner @ 2015-12-30  6:44 UTC (permalink / raw)
  To: emacs-orgmode

I keep my diary, action items, scheduled tasks etc in a single
org-mode file. It contains things like:

**  Norton my office <2015-03-11 Wed 10:00 +1w>
** TODO power  bill						       :home:
   DEADLINE: <2015-12-29 Tue>
** TODO review business manager PD
   SCHEDULED: <2015-12-27 Sun>

and lots of others.
I would like to share a version of my agenda for each week with colleagues, perhaps
even interface it with the exchange web services used by my
organization. The first task is to select only those entries with
active timestamps that fall within the week. 
My first attempt is a tag-search query like:
TIMESTAMP>"<-1d>"&TIMESTAMP<"<+7d>"
but that doesn't pick up the repeated entries. 

The other approach I can see is agenda filtering. I can filter by tag
and hence remove the entry with :home: but I can't see how to remove
the item with a SCHEDULED date but no specific time to happen. Is
there a simple workaround or should I use a richer set of tags to
accomplish this?
thanks again
Peter

-- 
Peter Rayner
Leader, Clean Air and Urban Landscapes NESP hub <http://www.nespurban.edu.au>
room 343 
School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761 
mobile +61 402 752 379, skype: petermorag 
mail-to: prayner@unimelb.edu.au TWITTER: @raynerstrings
google scholar profile <http://scholar.google.com.au/citations?user=H3up71wAAAAJ&hl=en>

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

* Re: exporting just timestamped entries from an agenda
  2015-12-30  6:44 exporting just timestamped entries from an agenda prayner
@ 2015-12-31  1:28 ` John Hendy
  2015-12-31  3:51   ` prayner
  0 siblings, 1 reply; 4+ messages in thread
From: John Hendy @ 2015-12-31  1:28 UTC (permalink / raw)
  To: prayner; +Cc: emacs-orgmode

On Wed, Dec 30, 2015 at 12:44 AM,  <prayner@unimelb.edu.au> wrote:
> I keep my diary, action items, scheduled tasks etc in a single
> org-mode file. It contains things like:
>
> **  Norton my office <2015-03-11 Wed 10:00 +1w>
> ** TODO power  bill                                                    :home:
>    DEADLINE: <2015-12-29 Tue>
> ** TODO review business manager PD
>    SCHEDULED: <2015-12-27 Sun>
>
> and lots of others.
> I would like to share a version of my agenda for each week with colleagues, perhaps
> even interface it with the exchange web services used by my
> organization. The first task is to select only those entries with
> active timestamps that fall within the week.
> My first attempt is a tag-search query like:
> TIMESTAMP>"<-1d>"&TIMESTAMP<"<+7d>"
> but that doesn't pick up the repeated entries.
>
> The other approach I can see is agenda filtering. I can filter by tag
> and hence remove the entry with :home: but I can't see how to remove
> the item with a SCHEDULED date but no specific time to happen. Is
> there a simple workaround or should I use a richer set of tags to
> accomplish this?
> thanks again
> Peter

Your request reminded me of something I was trying to do at one point.
I thought it was something simlar for a custom agenda view, but after
a fair bit of searching, it was for a sparse tree filter for inactive
time stamps (active already existed). So, maybe there's a 3rd way you
could get the format/data you want from an org file?

Perhaps you could try the following on your file?
- C-c / (opens sparse tree search)
- press =c= to toggle to "only active timestamps"
- press =D= to trigger the date range search
- select your start/end range

If that works, maybe someone could help you automate it as some sort
of query function.

For a test, I created the following:

#+begin_example
* tasks
** todo 1
   SCHEDULED: <2015-12-23 Wed>
** todo 2
   DEADLINE: <2015-12-23 Wed>
** todo 3
[2015-12-23 Wed]
** todo 4
   SCHEDULED: <2015-12-30 Wed>
** todo 5
   DEADLINE: <2015-12-30 Wed>
** todo 6
[2015-12-30 Wed]
** todo 7
   SCHEDULED: <2016-01-06 Wed>
** todo 8
   DEADLINE: <2016-01-06 Wed>
** todo 9
[2016-01-06 Wed]
** todo 10
   SCHEDULED: <2016-01-13 Wed>
** todo 11
   DEADLINE: <2016-01-13 Wed>
** todo 12
[2016-01-13 Wed]
#+end_example


Using the method above and selecting 12/30 -> 1/6 yields:

#+begin_example
* tasks
** todo 4
   SCHEDULED: <2015-12-30 Wed>
** todo 5
   DEADLINE: <2015-12-30 Wed>
...
#+end_example


If I extend to 1/7, I get:

#+begin_example
* tasks
** todo 4
   SCHEDULED: <2015-12-30 Wed>
** todo 5
   DEADLINE: <2015-12-30 Wed>
...
** todo 7
   SCHEDULED: <2016-01-06 Wed>
** todo 8
   DEADLINE: <2016-01-06 Wed>
...
#+end_example


Would that work? I used =C-c C-x v= (copy visible text) to produce the
above. It doesn't actually copy the ellipses; I just added them to
reproduce what I see.


Hope that helps!
John


>
> --
> Peter Rayner
> Leader, Clean Air and Urban Landscapes NESP hub <http://www.nespurban.edu.au>
> room 343
> School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
> tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761
> mobile +61 402 752 379, skype: petermorag
> mail-to: prayner@unimelb.edu.au TWITTER: @raynerstrings
> google scholar profile <http://scholar.google.com.au/citations?user=H3up71wAAAAJ&hl=en>
>

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

* Re: exporting just timestamped entries from an agenda
  2015-12-31  1:28 ` John Hendy
@ 2015-12-31  3:51   ` prayner
  2015-12-31  4:32     ` John Hendy
  0 siblings, 1 reply; 4+ messages in thread
From: prayner @ 2015-12-31  3:51 UTC (permalink / raw)
  To: John Hendy; +Cc: prayner, emacs-orgmode

Hi John, almost solves the problem, the catch is entries like:
**  Norton my office <2015-03-11 Wed 10:00 +1w>
The date range searches in either the sparse tree or the tag-property
match searches don't seem to calculate out repeating dates ... fair
enough that's probably quite an overhead. I'll look at adding a filter
for active timestamps to  agenda filtering.
regards
Peter

John Hendy writes:
>On Wed, Dec 30, 2015 at 12:44 AM,  <prayner@unimelb.edu.au> wrote:
>> I keep my diary, action items, scheduled tasks etc in a single
>> org-mode file. It contains things like:
>>
>> **  Norton my office <2015-03-11 Wed 10:00 +1w>
>> ** TODO power  bill                                                    :home:
>>    DEADLINE: <2015-12-29 Tue>
>> ** TODO review business manager PD
>>    SCHEDULED: <2015-12-27 Sun>
>>
>> and lots of others.
>> I would like to share a version of my agenda for each week with colleagues, perhaps
>> even interface it with the exchange web services used by my
>> organization. The first task is to select only those entries with
>> active timestamps that fall within the week.
>> My first attempt is a tag-search query like:
>> TIMESTAMP>"<-1d>"&TIMESTAMP<"<+7d>"
>> but that doesn't pick up the repeated entries.
>>
>> The other approach I can see is agenda filtering. I can filter by tag
>> and hence remove the entry with :home: but I can't see how to remove
>> the item with a SCHEDULED date but no specific time to happen. Is
>> there a simple workaround or should I use a richer set of tags to
>> accomplish this?
>> thanks again
>> Peter
>
>Your request reminded me of something I was trying to do at one point.
>I thought it was something simlar for a custom agenda view, but after
>a fair bit of searching, it was for a sparse tree filter for inactive
>time stamps (active already existed). So, maybe there's a 3rd way you
>could get the format/data you want from an org file?
>
>Perhaps you could try the following on your file?
>- C-c / (opens sparse tree search)
>- press =c= to toggle to "only active timestamps"
>- press =D= to trigger the date range search
>- select your start/end range
>
>If that works, maybe someone could help you automate it as some sort
>of query function.
>
>For a test, I created the following:
>
>#+begin_example
>* tasks
>** todo 1
>   SCHEDULED: <2015-12-23 Wed>
>** todo 2
>   DEADLINE: <2015-12-23 Wed>
>** todo 3
>[2015-12-23 Wed]
>** todo 4
>   SCHEDULED: <2015-12-30 Wed>
>** todo 5
>   DEADLINE: <2015-12-30 Wed>
>** todo 6
>[2015-12-30 Wed]
>** todo 7
>   SCHEDULED: <2016-01-06 Wed>
>** todo 8
>   DEADLINE: <2016-01-06 Wed>
>** todo 9
>[2016-01-06 Wed]
>** todo 10
>   SCHEDULED: <2016-01-13 Wed>
>** todo 11
>   DEADLINE: <2016-01-13 Wed>
>** todo 12
>[2016-01-13 Wed]
>#+end_example
>
>
>Using the method above and selecting 12/30 -> 1/6 yields:
>
>#+begin_example
>* tasks
>** todo 4
>   SCHEDULED: <2015-12-30 Wed>
>** todo 5
>   DEADLINE: <2015-12-30 Wed>
>...
>#+end_example
>
>
>If I extend to 1/7, I get:
>
>#+begin_example
>* tasks
>** todo 4
>   SCHEDULED: <2015-12-30 Wed>
>** todo 5
>   DEADLINE: <2015-12-30 Wed>
>...
>** todo 7
>   SCHEDULED: <2016-01-06 Wed>
>** todo 8
>   DEADLINE: <2016-01-06 Wed>
>...
>#+end_example
>
>
>Would that work? I used =C-c C-x v= (copy visible text) to produce the
>above. It doesn't actually copy the ellipses; I just added them to
>reproduce what I see.
>
>
>Hope that helps!
>John
>
>
>>
>> --
>> Peter Rayner
>> Leader, Clean Air and Urban Landscapes NESP hub <http://www.nespurban.edu.au>
>> room 343
>> School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
>> tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761
>> mobile +61 402 752 379, skype: petermorag
>> mail-to: prayner@unimelb.edu.au TWITTER: @raynerstrings
>> google scholar profile <http://scholar.google.com.au/citations?user=H3up71wAAAAJ&hl=en>
>>

-- 
Peter Rayner
Leader, Clean Air and Urban Landscapes NESP hub <http://www.nespurban.edu.au>
room 343 
School of Earth Sciences, University of Melbourne, 3010, Vic, Australia
tel: work: +61 (0)3 8344 9708; fax: +61 (0)3 8344 7761 
mobile +61 402 752 379, skype: petermorag 
mail-to: prayner@unimelb.edu.au TWITTER: @raynerstrings
google scholar profile <http://scholar.google.com.au/citations?user=H3up71wAAAAJ&hl=en>

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

* Re: exporting just timestamped entries from an agenda
  2015-12-31  3:51   ` prayner
@ 2015-12-31  4:32     ` John Hendy
  0 siblings, 0 replies; 4+ messages in thread
From: John Hendy @ 2015-12-31  4:32 UTC (permalink / raw)
  To: prayner; +Cc: emacs-orgmode

On Wed, Dec 30, 2015 at 9:51 PM,  <prayner@unimelb.edu.au> wrote:
> Hi John, almost solves the problem, the catch is entries like:
> **  Norton my office <2015-03-11 Wed 10:00 +1w>
> The date range searches in either the sparse tree or the tag-property
> match searches don't seem to calculate out repeating dates ... fair
> enough that's probably quite an overhead. I'll look at adding a filter
> for active timestamps to  agenda filtering.
> regards
> Peter


Ah, you said as much in the original message, but with not seeing the
explicit format (with the +1w), the phrase "repeated entries" wasn't
ringing a bell and I missed your aim. Sorry about that! I think your
current search should only pull active timestamps, right? It'll miss
the repeated ones, but when I run the same agenda query in your
original post, I only get hits for the active timestamped entries in
my example above.

Good luck!
John

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

end of thread, other threads:[~2015-12-31  4:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-30  6:44 exporting just timestamped entries from an agenda prayner
2015-12-31  1:28 ` John Hendy
2015-12-31  3:51   ` prayner
2015-12-31  4:32     ` John Hendy

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