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?
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.
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
Related
I am using Emacs Orgmode 9.1.3 to track habit and I saw a very useful habit template below. However I was not sure what the forward slash / meant in the date.
* NEXT HABIT
[2017-12-07 Thu 10:26]
SCHEDULED: <2017-12-07 Thu .+1d/3d>
:PROPERTIES:
:STYLE: habit
:REPEAT_TO_STATE: NEXT
:END:
I read through the org documentation but there is no mention of the forward slash in setting a repeated task.
There is a reference to some sort of reminder like this:
DEADLINE: <2005-10-01 Sat +1m -3d>.
which will provide a reminder three days in advance of a task due date.
Does anyone know what the forward slash does?
You looked in the wrong section of the documentation: this notation applies to habits where you find:
The TODO may also have minimum and maximum ranges specified by using the syntax ā.+2d/3dā, which says that you want to do the task at least every three days, but at most every two days.
I'm a beginner with Common Lisp and I'm currently trying out the package local-time.
I'm trying to create a date with the make-timestamp macro which creates an instance of timestamp. I consulted the local-time manual, but I do not understand which arguments I have to supply.
The description of the macro is as follows:
ā Macro: make-timestamp &key :day :sec :nsec
Expands to an expression that creates an instance of a timestamp exactly as specified.
Simply using the macro without any arguments makes this happen:
LOCAL-TIME> (make-timestamp)
#2000-03-01T01:00:00.000000+01:00
2000-03-01 is the standard epoch here, so this seems okay so far.
Passing :day 3 as an argument gives me this:
LOCAL-TIME> (make-timestamp :day 3)
#2000-03-04T01:00:00.000000+01:00
Okay. But how can I construct a date from this without having to count days and days into the future from 2000-03-01?
There is also a function called encode-timestamp which appears to do exactly what I want (namely: creating a date by supplying information like the day of the month, month, year, hour, minutes and so on):
LOCAL-TIME> (encode-timestamp 0 0 30 10 13 5 2009)
#2009-05-13T10:30:00.000000+02:00
But then, what is the make-timestamp macro supposed to do?
Make-timestamp is used by several of the encoding functions, including encode-timestamp. I would regard it as rather lowlevel, but it might be of interest to a user of the library.
Encode-timestamp seems to be just the function you want.
If I want to export a itemized list from Org to LaTeX, is there a way to set arbitrary itemization? The usual Org plain list, i.e. - item will result in an \begin{itemize} environment, but I would like to set arbitrary itemization. For example, is there any kind of Org list markup that will output this kind of LaTeX list environment?
\begin{itemize}
\item[2013]
This item happened in 2013
\item[2012]
This item happened in 2012
\end{itemize}
Edit:
The problem is that Org is recognising the years as inactive timestamps or footnote references and this is screwing up the LaTeX export. Solution below.
I can't tell whether it's what you're looking for, but
- 2013 :: This happened in 2013
- 2012 :: This happened in 2012
will produce
\begin{description}
\item[2013] This happened in 2013
\item[2012] This happened in 2012
\end{description}
I haven't tried, but according to this WikiBook it seems as though there will be no dot trailing the year.
Following fniessen's suggestion below I found the solution to produce an itemize environment without having the years turn into inactive timestamps or footnote references. The key is to insert or surround the year with spaces, which will be ignored by the TeX conversion.
- [ 2013 ] This item happened in 2013
- [ 2012 ] This item happened in 2012
If there is a more official way to do this I'd like to here it.
The other answers provide great solutions for creating both enumerate and description environments, but it was specifically itemize I was after.
Use something such as:
1. [#2013] This item happened in 2013
2. [#2012] This item happened in 2012
The solution appointed by the org-mode manual is ::, so:
Important actors in this film are:
- Elijah Wood :: He plays Frodo
- Sean Astin :: He plays Sam, Frodo's friend.
by the way, [ text ] didn't work for me.
If as me you don't like the decription style with "- ::" syntax (that produces weird latex export) a workaround is simply to use
- ##latex:[2013]## This item happened in 2013
- ##latex:[2012]## This item happened in 2012
and, more generally,
- ##latex:[yourcustomitem]## blah blah
I am trying to have the "Birthday" and "Name" properties of an Org-mode entry added to the agenda automatically:
* John
:PROPERTIES:
:Name: John
:Birthday: (5 4 1900)
:END:
I found a way to add an entry at the correct anniversary date in the agenda by inserting the following line right after the properties:
%%(apply 'diary-anniversary (read (org-entry-get nil "Birthday"))) John
However, using this code, I still have to enter the name manually. Is there a way to have the value of the "Name" property added to the diary text automatically for all entries?
EDIT 1: the example did not work before, now added parantheses around the value of the birthday property
Maybe https://julien.danjou.info/projects/emacs-packages#org-contacts is the solution to your problem. org-contacts is a address book for org-mode.
It is probably better to ask this at the Org mailing list, they are very active, and Carsten Dominik (the creator of org-mode) usually answers posts on this list almost immediately (BTW, this is the main list email.
Perhaps you a taking a path which requires you to write some lisp to get what you want. The org-mode manual gives an example of something similar, but I'm guessing you wanted a simpler format, when it describes the calendar/agenda integration http://www.gnu.org/software/emacs/manual/html_node/org/Weekly_002fdaily-agenda.html
* Birthdays and similar stuff
#+CATEGORY: Holiday
%%(org-calendar-holiday) ; special function for holiday names
#+CATEGORY: Ann
%%(diary-anniversary 14 5 1956) Arthur Dent is %d years old
%%(diary-anniversary 2 10 1869) Mahatma Gandhi would be %d years old
I would think you have other options if you want a custom setup: either a new type of export or dynamic blocks might be used. This may highlight the different use-case of agenda over the diary. The agenda seems more geared towards day to day tasks.
I would like to use agenda to keep track of my classes, assuming i have a com 355 class every week from march to june,
<2010-03-23 Tue 10:40-12:10 +1w>
this works but it schedules it indefinitely if i use,
<2010-03-23 Tue 10:40-12:10 +1w>-<2010-06-23>
it gets scheduled for everyday from march to june, how can i schedule this once a week for a period of time?
I had a similar problem and found usefull the answer to "How can I create more complex appointments in my org-files?" in the FAQ at http://orgmode.org/worg/org-faq.html#Appointments/Diary You can even add exceptions for holidays. I was not able to make work the time though: when you add it the formula stops working :(
1) My example: Courses on Tuesdays and Thursdays falling in [2011-03-07 Mon]--[2011-06-25 Sat] minus [2011-05-15 Sun]--[2011-05-20 Fri] (a week of holiday):
** TEST Tuesday and Thursday in [2011-03-07 Mon]-[2011-06-20 Mon] minus holidays [2011-05-15 Sun]-[2011-05-22 Sun]
<%%(and (diary-block 3 7 2011 6 20 2011)(or (= 2 (calendar-day-of-week date) (= 4 (calendar-day-of-week date))))(not (diary-block 5 15 2011 5 22 2011)))>
If you decompose the boolean function, you get the following, which is self explanatory:
<%%(and (diary-block 3 7 2011 6 20 2011)
(or (= 2 (calendar-day-of-week date) (= 4 (calendar-day-of-week date))))
(not (diary-block 5 15 2011 5 22 2011))
)>
2) My suggestion for your case: a class every Tuesday every week from March to June (I took the liberty to fix the year to 2011):
<%%(and (= 2 (calendar-day-of-week date)) (diary-block 3 23 2011 6 23 2011)))>
You might want to have a look to the newly added section "How can I schedule a weekly class that lasts for a limited period of time?", about the function "org-diary-class", but it still seems to have problem with scheduling hours :(
Hope it helps,
There might not be a way to do that directly, but Org-mode allows you to specify times using the diary sexp style. (http://orgmode.org/org.html#Timestamps)
If you look at some of the examples in the manual for the diary functions (http://www.gnu.org/software/emacs/manual/html_node/emacs/Sexp-Diary-Entries.html#Sexp-Diary-Entries) you'll see that you can provide arbitrary code to define the occurrences of the event.
There is no way to do what you want --- ranges don't work for this (I asked on the org-mode list).
You can clone the appointment, setting the clones one week apart. This will give you one instance of the item for every day in the period. This might be cumbersome, or it might be just what you want.
You can use the diary to do this, there's an explanation here if you follow the instructions (make sure you have a ~/diary file) then it will pick it up and add it to your agenda. You may need to alter your date format depending on your settings.
Something like this should do the trick, and it should schedule hours
%%(org-diary-class 2011 5 31 2011 10 13 2) 5:00pm-6:30pm German Class
%%(org-diary-class 2011 5 31 2011 10 13 4) 6:45pm-8:15pm German Class
Where the numbers represent
Start Y M D Finish Y M D DayOfWeek (Sun = 0, Mon = 1 ...)
This works for me already many years:
* Modeling of curves and surfaces II 13:10-14:40
<%%(org-class 2019 2 18 2019 5 17 4 13)>