emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Suggestion: Weektree
@ 2013-10-01 10:11 Anders Johansson
  2013-10-01 15:43 ` John Hendy
  0 siblings, 1 reply; 3+ messages in thread
From: Anders Johansson @ 2013-10-01 10:11 UTC (permalink / raw)
  To: emacs-orgmode

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)

Motivations:
This would keep working weeks together (not broken over month boundaries).
At least here in Sweden it's pretty common to refer to weeks by number 
so this would perhaps be useful for that reason.

Problems:
My suggestion above uses ISO-weeks 
(http://en.wikipedia.org/wiki/ISO_week_date), maybe other conventions 
should also be an option 
(http://en.wikipedia.org/wiki/Seven-day_week#Week_numbering).

Implementation:
I tried to see if this could be implemented on top of the datetree code, 
but as far as I could tell, to much of that mechanism was hardcoded into 
months etc. The task seemed to difficult for me.

If someone else thinks this is a good idea I think there are more people 
than me that would find it quite useful though.

Greetings from Sweden,
Anders Johansson

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

* Re: Suggestion: Weektree
  2013-10-01 10:11 Suggestion: Weektree Anders Johansson
@ 2013-10-01 15:43 ` John Hendy
  2013-10-04 11:21   ` Mike McLean
  0 siblings, 1 reply; 3+ messages in thread
From: John Hendy @ 2013-10-01 15:43 UTC (permalink / raw)
  To: Anders Johansson; +Cc: emacs-orgmode

On Tue, Oct 1, 2013 at 5:11 AM, Anders Johansson <mejlaandersj@gmail.com> 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 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

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

* Re: Suggestion: Weektree
  2013-10-01 15:43 ` John Hendy
@ 2013-10-04 11:21   ` Mike McLean
  0 siblings, 0 replies; 3+ messages in thread
From: Mike McLean @ 2013-10-04 11:21 UTC (permalink / raw)
  To: John Hendy; +Cc: emacs-orgmode, Anders Johansson


On Oct 1, 2013, at 11:43 AM, John Hendy <jw.hendy@gmail.com> wrote:

> On Tue, Oct 1, 2013 at 5:11 AM, Anders Johansson <mejlaandersj@gmail.com> 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
> 

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

end of thread, other threads:[~2013-10-04 11:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-01 10:11 Suggestion: Weektree Anders Johansson
2013-10-01 15:43 ` John Hendy
2013-10-04 11:21   ` Mike McLean

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