[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Featurep weekday-only timestamps
From: |
Matthew Lundin |
Subject: |
Re: [Orgmode] Featurep weekday-only timestamps |
Date: |
Mon, 20 Apr 2009 11:54:00 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) |
Hi Joel,
address@hidden (Joel J. Adamson) writes:
> Howdy Org-moders,
>
> I use org from git updated weekly. I would really like to be able to
> specify a timestamp for certain days of the week, e.g. M-F, or MWF,
> without specifying multiple timestamps for a single headline. Doing
> that for something that happens twice a week is no hassle, but doing it
> five times seems like too much.
>
> What I'd like is to have a headline like this:
> ** Sacrifice for Demons <2009-04-20 Mon,Wed,Fri 10:00 +1w>
> ** Wake Up <2009-04-20 Mon-Fri 5:45 +1w >
You can do this with a diary sexp within org-mode. E.g., I used the
following for a class that I taught on Tuesdays and Thursdays from
January 8 through February 24:
--8<---------------cut here---------------start------------->8---
** Teach Course 1:20pm-2:35pm
<%%(let ((d (calendar-day-of-week date))) (and (or (= d 2) (= d 4))
(diary-block 1 8 2009 2 24 2009)))>
--8<---------------cut here---------------end--------------->8---
I'm an elisp amateur, but I imagine you could create your example above
with the following:
--8<---------------cut here---------------start------------->8---
** Wake up 5:45am
<%%(memq (calendar-day-of-week date) '(1 3 5)))>
--8<---------------cut here---------------end--------------->8---
Someone please correct me if I'm doing something wrong here.
Best,
Matt