4

Was just thinking. I've noticed a lot of people schedule their free time in to their agendas/planners.

I think it would be useful to automatically schedule out free time when opening the agenda. For example, if I have schedule tennis practice, and a meeting, my current agenda would like like this:

8:00-10:00 Scheduled: Tennis Practice

16:30-18:00 Meeting

Whereas, it could look like this:

8:00-10:00 Scheduled: Tennis Practice

10:00-16:30 Free

16:30-18:00 Scheduled: Meeeting

18:00-20:00 Free

...without having to schedule to free time explicitly.

To me, this is a lot easier to comprehend than the above time graph, particularly since I find looking at my watch more useful than the time grid.

How can I do this?

3

This does not quite reproduce what you want, but it's close.

Try setting org-agenda-use-time-grid to t. That will show you a time grid like this:

  Weather:     6:34...... Sunrise 
               8:00...... ----------------
              10:00...... ----------------
              12:00...... ----------------
              14:00...... ----------------
              16:00...... ----------------
              18:00...... ----------------
  Weather:    18:37...... Sunset 
              20:00...... ----------------

Then check out the variable org-agenda-time-grid. Its doc string says:

org-agenda-time-grid is a variable defined in ‘org-agenda.el’.
Its value is
((daily today require-timed)
 (800 1000 1200 1400 1600 1800 2000)
 "......" "----------------")

  You can customize this variable.

Documentation:
The settings for time grid for agenda display.
This is a list of four items.  The first item is again a list.  It contains
symbols specifying conditions when the grid should be displayed:

 daily         if the agenda shows a single day
 weekly        if the agenda shows an entire week
 today         show grid on current date, independent of daily/weekly display
 require-timed show grid only if at least one item has a time specification
 remove-match  skip grid times already present in an entry

The second item is a list of integers, indicating the times that
should have a grid line.

The third item is a string which will be placed right after the
times that have a grid line.

The fourth item is a string placed after the grid times.  This
will align with agenda items.

So changing the fourth item (or not: you might leave it as a bunch of dashes) should do what you want:

  (setq org-agenda-use-time-grid t)
  (setq org-agenda-time-grid '((daily today require-timed)
                               (800 1000 1200 1400 1600 1800 2000)
                               "......" "----Free----"))

What this does not do is coalesce a range of free times into one. I think that would require substantial changes in the code.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.