emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Thomas Baumann <dtbaumann@yahoo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: jump to iso-week in agenda
Date: Thu, 20 Mar 2008 08:50:44 +0100	[thread overview]
Message-ID: <A07538F6-A066-41D5-BC89-EC3B5C7C326A@science.uva.nl> (raw)
In-Reply-To: <m3abl0rn81.fsf@norvel.baumann-gauting.site>


On Mar 15, 2008, at 5:00 PM, Thomas Baumann wrote:

> Hi,
>
> I really like the most advanced (pure magic working ...) and easy  
> way of
> entering dates in org mode. When answering a phone call it's only a  
> few
> keystrokes to jump to the date and settle the appointment. However  
> there
> are some people thinking in weeks (iso-week). So when those friends  
> call
> it get's much more complicated. Currently when I would like to jump to
> say week 46, I might find an old paper calendar or M-x
> calendar-goto-iso-week.
>
> How difficult would it be to
> (a) add the current iso-week into the headline of the Week-View

That does not work, because the week view may or may not start
on a Monday, so it may contain days from two different weeks.
For now I am adding the ISO week number to every date in the
agenda, if this seems too cluttered we need to think of a
different solution.

> (b) include magic jump to a certain week eg. *46 to jump to week 46

I have just pushed the necessary changes into the git repo.  Here is the
user interface:


Suport for ISO week dates (ISO 8601)
------------------------------------

     Dates in the agenda now show the ISO week and day
     specification, in the form `W08 2', meaning Tuesday of
     week 2.

     The keys `d', `w', `m', and `y' in the agenda view now accept
     prefix arguments.  Remember that in the agenda, you can
     directly type a prefix argument by typing a number, no need
     to press `C-u' first.  The prefix argument may be used to
     jump directly to a specific day of the year, ISO week, month,
     or year, respectively.  For example, `32 d' jumps to February
     1st, `9 w' to ISO week number 9.  When setting day, week, or
     month view, a year may be encoded in the prefix argument as
     well.  For example, `200712 w' will jump to week 12 in
     2007.  If such a year specification has only one or two
     digits, it will be mapped to the interval 1938-2037.

     When entering a date at the date prompt, you may now also
     specify an ISO week.  For example

      w4              Monday of week 4
      fri w4          Friday of week 4
      w4-5            Same as above
      2012 w4 fri     Friday of week 4 in 2012.
      2012-W04-5      Same as above

     So far I have not activated the effect of
     `org-read-date-prefer-future' on this functionality, because
     it seemed too unpredictable for me (as I usually do not know
     which week I am in).  I'd appreciate comments on this
     issue:  Should `org-read-date-prefer-future' also push dates
     into the next year if the week you are entering has already
     passed in the current year?  For consistency I guess this
     should be the case, but I cannot quite wrap my head around
     it.

     I hope but am not entirely convinced that this will behave
     sanely also during the first/last week of a year.  Please
     test extensively and report back.


Enjoy!

- Carsten

  parent reply	other threads:[~2008-03-20  7:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-15 16:00 jump to iso-week in agenda Thomas Baumann
2008-03-17 13:33 ` Detlef Steuer
2008-03-19 12:23   ` Manish
2008-03-17 18:49 ` Carsten Dominik
2008-03-20  7:50 ` Carsten Dominik [this message]
2008-03-20  8:55   ` Thomas Baumann
2008-03-20  9:09     ` Carsten Dominik
2008-03-20 10:36       ` Thomas Baumann
2008-03-20 13:21         ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A07538F6-A066-41D5-BC89-EC3B5C7C326A@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=dtbaumann@yahoo.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).