From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: exporting just timestamped entries from an agenda Date: Wed, 30 Dec 2015 19:28:30 -0600 Message-ID: References: <22147.32099.579573.677738@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aES2a-0000uV-JY for emacs-orgmode@gnu.org; Wed, 30 Dec 2015 20:28:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aES2Z-0004qC-4C for emacs-orgmode@gnu.org; Wed, 30 Dec 2015 20:28:32 -0500 Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:35460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aES2Y-0004pz-VH for emacs-orgmode@gnu.org; Wed, 30 Dec 2015 20:28:31 -0500 Received: by mail-oi0-x22b.google.com with SMTP id l9so182041086oia.2 for ; Wed, 30 Dec 2015 17:28:30 -0800 (PST) In-Reply-To: <22147.32099.579573.677738@localhost.localdomain> 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: prayner@unimelb.edu.au Cc: emacs-orgmode On Wed, Dec 30, 2015 at 12:44 AM, 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 > 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 >