3

I have a class that meets regularly on Mondays/Wednesdays from 12:00-12:50 and on Thursdays from 16:00-16:50. I'd like to keep all the notes together, because it's all for the same class, but I don't know how I would set up this recurring event.

There is an easy-enough way to define arbitrary date ranges, but nothing I can see for time ranges that would also show up correctly in the agenda. They're also in different rooms, so if it's possible I'd like to add something denoting the room number. If it were just dates (at the same time as well), I would go ahead and just

(and (org-class 2013 1 21 2013 5 9 1) (org-class 2013 1 21 2013 5 9 3))

and it would be fine. Is there a(n org-mode) function to describe times? Is there a way to add notes (like the room number)? I'm not quite aware of how this whole section of org-mode works (although my guess would be that if the sexp evaluates to non-nil, then the event is active).

So, in summary, I'd like a way to be able to assign arbitrary collections of date-time-range objects to org-mode events, ideally with the notes I was talking about.


EDIT
As a secondary (but obviously related) question, what's the sexp way of specifying time?

Sean Allred
  • 3,558
  • 3
  • 32
  • 71

2 Answers2

4

You can use multiple time-stamps within the same entry.

For example: C-c.mon 12:00-12:50RET will produce <2013-01-28 Mon 12:00-12:50>. You can then edit it to add a repeater +1w. The final time-stamp looks like <2013-01-28 Mon 12:00-12:50 +1w>.

I don't know how you can manage the class room though.

Daimrod
  • 4,902
  • 23
  • 25
  • Again, the class room thing was more on the ideal-scenario side (although I'm sure it's possible). One question I would ask, though, is how would you then deal with skipped dates (or a stop date)? – Sean Allred Jan 24 '13 at 19:29
  • @vermiculus: I would either make the time-stamp inactive (with `C-c !`), remove the time-stamp or ignore it. – Daimrod Jan 24 '13 at 21:29
  • I get what you're saying, and I'm using your solution for the time being :) however, I'm positive that there is a more complete and user-friendly way to do this. Sometime this weekend I'm going to do a trace of some sort and see exactly how the agenda is built, but until then I guess I'll just deal. In the meantime, I would generally have no idea when the class doesn't meet -- it'd be best to set and forget. – Sean Allred Jan 25 '13 at 10:12
2

Wouldn't creating subtrees for the two rooms and then a third subtree for the notes themselves?

For example (see Org-FAQ for details on putting time in the same line. I think adding the time within the <> will add it to the time, but not entirely sure, otherwise add it afterwards and it should still include it within the information.

* Math Class
:PROPERTIES:
:CATEGORY: Math Class
:END:
** Room #1
<%%(and (org-class 2013 1 21 2013 5 9 1) (org-class 2013 1 21 2013 5 9 3)) 12:00-- 12:50>
** Room #2
<%%(org-class 2013 1 21 2013 5 9 4) 16:00--16:50>
** Notes
Jonathan Leech-Pepin
  • 7,684
  • 2
  • 29
  • 45
  • 2
    I think OP should have written `or`, but oh well. BTW, angle brackets will do the org-way and pull headline content. Without angle brackets will do the diary way and pull from the sexp's line. And agenda view will extract the time from whichever of headline or diary line is in play. (Alternatives to time inside angle brackets.) – Brady Trainor Apr 06 '14 at 16:26