From: Michael Brand <michael.ch.brand@gmail.com>
To: Daya Atapattu <atapattud@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: Org-mode Habit with Varying Description
Date: Tue, 21 Oct 2014 17:37:54 +0200 [thread overview]
Message-ID: <CALn3zohei=PV5+tg7Ou3wp18Ecp0YLoEZ3TgeTn_NVnq5rVU-w@mail.gmail.com> (raw)
In-Reply-To: <CAMaREXYajGgfuX69Z44+NzLW7tBi6PAMdRHTjobqBcndR8My=Q@mail.gmail.com>
Hi Daya
On Mon, Oct 20, 2014 at 4:33 PM, Daya Atapattu <atapattud@gmail.com> 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
prev parent reply other threads:[~2014-10-21 15:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 14:33 Org-mode Habit with Varying Description Daya Atapattu
2014-10-20 14:52 ` Bastien
2014-10-20 15:46 ` Daya Atapattu
2014-10-20 16:02 ` Jorge A. Alfaro-Murillo
2014-10-20 17:37 ` Pete Ley
2014-10-21 0:34 ` Eric Abrahamsen
2014-10-21 12:21 ` Samuel Loury
2014-10-21 16:29 ` Eric Abrahamsen
2014-10-24 3:42 ` Pete Ley
2014-10-26 15:51 ` Eric Abrahamsen
2014-10-28 13:28 ` Nicolas Goaziou
2014-10-28 13:41 ` Eric Abrahamsen
2014-10-28 15:01 ` Eric Abrahamsen
2014-10-28 16:22 ` Nicolas Goaziou
2014-10-28 16:38 ` Eric Abrahamsen
2014-10-29 20:48 ` Nicolas Goaziou
2014-10-20 19:13 ` Melleus
2014-10-20 20:03 ` Brady Trainor
2014-10-21 15:37 ` Michael Brand [this message]
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='CALn3zohei=PV5+tg7Ou3wp18Ecp0YLoEZ3TgeTn_NVnq5rVU-w@mail.gmail.com' \
--to=michael.ch.brand@gmail.com \
--cc=atapattud@gmail.com \
--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).