emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Org-mode Habit with Varying Description


From: Michael Brand
Subject: Re: [O] Org-mode Habit with Varying Description
Date: Tue, 21 Oct 2014 17:37:54 +0200

Hi Daya

On Mon, Oct 20, 2014 at 4:33 PM, Daya Atapattu <address@hidden> wrote:
> I like to schedule studying a book:  It would be scheduled as "Read pages
> 100-125."  Then the next day it should read "Read pages 126-150."  The
> description of the habit varies; org-mode picks that up sequentially from a
> list.

Once I was using this simple solution for a continuous burn down task,
adapted to your example:

* Burn down
%%(when (and (not (org-date 2014 10 20)) (calendar-date-equal date
(calendar-current-date))) (message "Read book until page %d 19:00" (*
25 (- (calendar-absolute-from-gregorian date)
(calendar-absolute-from-gregorian '(10 15 2014))))))

Note that "%%(" has to start on the first column and that the rest
could be moved partially or as a whole into a function call for easier
maintenance.

"19:00" is an optional time of day.

"2014 10 20" (YYYY MM DD) is a poor man's DONE (which I use mainly for
diary-float) and has to be set manually to today after the part of
today has been done to let the task disappear from the agenda view of
today.

"10 15 2014" (MM DD YYYY) is the start date. Can also be used as an
end date for a countdown by swapping the subtraction operands.

calendar-date-equal is used to show it only for the day of today in an
agenda view showing also tomorrow etc.

Instead of using the number to print with %d it can easily be used to
do a lookup in a variable containing a list of whatever which can not
be computed directly like e. g. the headings of the book chapters.

Inspired by Worg "Add sunrise/sunset times to the agenda", currently
http://orgmode.org/worg/org-hacks.html#sec-2-10

Michael



reply via email to

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