emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Suggestion: Weektree


From: Mike McLean
Subject: Re: [O] Suggestion: Weektree
Date: Fri, 4 Oct 2013 07:21:58 -0400

On Oct 1, 2013, at 11:43 AM, John Hendy <address@hidden> wrote:

> On Tue, Oct 1, 2013 at 5:11 AM, Anders Johansson <address@hidden> 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:
>> 
>> * 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!
>> 
>> (with names of months and days localised as usual)
>> 
> 
> [snip]
> 
> 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 “now,” 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.
> 
> 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
> 
> 
> Best regards,
> John
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]