emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] defining a clocktable in a capture template with absolute timesp


From: Brian van den Broek
Subject: Re: [O] defining a clocktable in a capture template with absolute timespan computed relative to today
Date: Mon, 30 Apr 2012 19:29:03 +0200

On 27 April 2012 05:52, Ippei FURUHASHI <address@hidden> wrote:
> Hi Brian,
>
> Brian van den Broek <address@hidden> writes:
>> how to add 1 day to the return value of (current-time).
>
> This hard coding is out of org-mode range,
>
> #+BEGIN_SRC elisp
> (format-time-string "%Y-%m-%d" (time-add (current-time) (seconds-to-time (* 
> 24 60 60))))
> #+END_SRC
>
> #+RESULTS:
> : 2012-04-28

<snip>

Hi IP,

Thanks for the reply and apologies for the delay in my response; I was
traveling.

Thanks too for the code sample. It does exactly what was desired. (I
expect I ought to have been able to dig that up for myself, so a
double thanks :-)

>> I've been experimenting with a new means of using org to plan my day at
>> the outset and, at the end of it, to easily review how close I have come
>> to accomplishing what I planned.
> I'm very interested. How do you compare your plan with results?


I was experimenting with planning tasks at the beginning of the day by
assigning a number of .5 hour blocks to them at the outset of the day
and then simply visually inspecting a clock table for the day at day's
end to see how well I managed to adhere to the intent. I have
something like this in my org-capture-templates definition:

#+BEGIN_SRC elisp
("p" "Plan the Day" entry (file+datetree "log.org")   "* Plan and Work
Log for %(format-time-string \"%Y-%m-%d\" (current-time)) :plan:
  :PROPERTIES:
  :entered: %U
  :END:

  |-----------------------------------+-----------------------------|
  | Task                            * | Pomos                     * |
  |-----------------------------------+-----------------------------|
  | [[id:de721347-0896-41d3-84d0-da824332c71c][Plan the day]]
            | ( ) %i                        |
  | [[id:898a9827-2d51-4fd7-8e07-4ff678a83e19][Some Task]]
      | [ ][ ]                         |
  | [[id:f30fc641-5e22-4329-8b9b-58dd26c28f54][Work on Textbook]]
             | [ ][ ] [ ][ ]               |
  |-----------------------------------+-----------------------------|

#+BEGIN: clocktable :maxlevel 4 :scope agenda :tstart
\"<%(format-time-string \"%Y-%m-%d %a\" (current-time)) 08:00>\" :tend
\"<%(format-time-string \"%Y-%m-%d %a\" (time-add (current-time)
(seconds-to-time (* 24 60 60)))) 08:00>\" :link t :narrow 60! :indent
t :tcolumns 3 :fileskip0

#+END:

* Day's End :journal:

  " :empty-lines 1  :clock-in t :clock-resume t)

)))
#+END_SRC

(I am an extreme night owl, so 08:00 is a good place to mark the day
change for me. I have '(setq org-extend-today-until 8)' in my .emacs.)

Several constant tasks are built into the capture template, and each
day I would add to and subtract from the daily plan as appropriate. I
use '( )' to mark a .5 hour block that I estimated would be sufficient
for the task at issue and a '[ ]' for a .5 hour block devoted to an
ongoing substantial task. As I consume the blocks, I change them to
'(X)' and '[X]'. For tasks where I underestimated the time needed, I
use ' + ' to separate the second estimate. Tasks where I overestimated
have the unconsumed '( )' left as is. At the end of the day, I update
the clock table, and judge how well my plans were followed by a simple
visual scan. I also fill out a "diary" type entry under the headline
at the end of the capture template.

After doing this for a while, I abandoned it as having too much
overhead for how I am presently working. I am on leave from a college
teaching job for this academic year, and most of the projects that I
am working on are large ongoing ones that I want to work on each day,
but don't have broken down into estimate-able subtasks. (For instance,
I am writing a textbook; I want to spend at least 2 hours a day on
that, and will keep doing so until it is done, but there are no
detailed subtasks suitable for estimation.) There is little flux and
it is easy enough to tell by use of the clock table alone how well I
am living up to my intentions.

I will try this method again next semester when I am back to teaching
and have more smaller tasks that are suitable for estimation (e.g.,
"Prepare Tuesday's lecture notes"). In any case, I don't aspire to do
anything more robust than a quick visual inspection at the end of the
day to see how my day matched my plans.

Best,

Brian vdB



reply via email to

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