From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike McLean Subject: Re: Suggestion: Weektree Date: Fri, 4 Oct 2013 07:21:58 -0400 Message-ID: <06D5EA7B-F307-46EF-81B8-C7DFBEAAFE02@pobox.com> References: <524A9FE4.1060104@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VS3SU-0002Ok-AO for emacs-orgmode@gnu.org; Fri, 04 Oct 2013 07:22:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VS3SP-0001Vw-JX for emacs-orgmode@gnu.org; Fri, 04 Oct 2013 07:22:10 -0400 Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:58015 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VS3SP-0001Us-Ev for emacs-orgmode@gnu.org; Fri, 04 Oct 2013 07:22:05 -0400 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: John Hendy Cc: emacs-orgmode , Anders Johansson On Oct 1, 2013, at 11:43 AM, John Hendy wrote: > On Tue, Oct 1, 2013 at 5:11 AM, Anders Johansson = wrote: >> Greetings, >> It's very nice to keep a journal in a datetree (using the capture = mechanism) >> but for my uses it would actually be even more useful to keep it in a >> /weektree/. Something like this: >>=20 >> * 2013 >> ** W39 (September 23 - September 29) >> *** 2013-09-23 Monday >> **** note 1 >> **** note 2 >> *** 2013-09-24 Tuesday >> *** 2013-09-25 Wednesday >> ** W52 (December 23 - December 29) >> *** 2013-09-25 Wednesday >> **** Christmas, no work done. >> * 2014 >> ** W1 (December 30 - January 5) >> *** 2013-09-31 Tuesday >> **** New year's eve party! >>=20 >> (with names of months and days localised as usual) >>=20 >=20 > [snip] >=20 > Not quite what you want, but I was looking for how to customize the > datetree using a capture template a bit back and made some decent > progress. You might want to check out those threads. All you should > need to do is figure out how to convert a date range (wherever you are > in the current week) to a week number I just did this (the conversion) recently so it was on my mind. This = provides the week number as a string, not a number, and does based on = =93now,=94 but it should give you what you want. Week number in ISO of beginning of this week based on a Monday week = start: (format-time-string "%V" (nth 0 (org-clock-special-range 'thisweek nil = nil 1))) Week number in ISO of end of this week based on a Monday week start: (format-time-string "%V" (nth 1 (org-clock-special-range 'thisweek nil = nil 1))) HTH > and then supply the > supplementary start/stop days for the week in parentheses. >=20 > I think I did have issues capturing to a non-existing top level tree; > as in I think I had to pre-populate my year-month headline, and *then* > I could capture my individual days to it. Anyway, give these a > reading: > - http://osdir.com/ml/emacs-orgmode-gnu/2012-08/msg00396.html > - = http://lists.gnu.org/archive/html/emacs-orgmode/2012-08/msg01174.html >=20 >=20 > Best regards, > John >=20