- publishing free software manuals
The Org Mode 7 Reference Manual
by Carsten Dominik and others
Paperback (6"x9"), 282 pages
ISBN 9781906966089
RRP £9.95 ($14.95)

Sales of this book support the Org project! Get a printed copy>>>

10.3.1 The weekly/daily agenda

The purpose of the weekly/daily agenda is to act like a page of a paper agenda, showing all the tasks for the current week or day.

C-c a a
Compile an agenda for the current week from a list of Org files. The agenda shows the entries for each day. With a numeric prefix(83) (like C-u 2 1 C-c a a) you may set the number of days to be displayed (see also the variable org-agenda-ndays)

Remote editing from the agenda buffer means, for example, that you can change the dates of deadlines and appointments from the agenda buffer. The commands available in the Agenda buffer are listed in section 10.5 Commands in the agenda buffer.

Calendar/Diary integration

Emacs contains the calendar and diary by Edward M. Reingold. The calendar displays a three-month calendar with holidays from different countries and cultures. The diary allows you to keep track of anniversaries, lunar phases, sunrise/set, recurrent appointments (weekly, monthly) and more. In this way, it is quite complementary to Org. It can be very useful to combine output from Org with the diary.

In order to include entries from the Emacs diary into Org-mode's agenda, you only need to customize the variable

(setq org-agenda-include-diary t)

After that, everything will happen automatically. All diary entries including holidays, anniversaries, etc., will be included in the agenda buffer created by Org-mode. SPC, TAB, and RET can be used from the agenda buffer to jump to the diary file in order to edit existing diary entries. The i command to insert new entries for the current date works in the agenda buffer, as well as the commands S, M, and C to display Sunrise/Sunset times, show lunar phases and to convert to other calendars, respectively. c can be used to switch back and forth between calendar and agenda.

If you are using the diary only for sexp entries and holidays, it is faster to not use the above setting, but instead to copy or even move the entries into an Org file. Org-mode evaluates diary-style sexp entries, and does it faster because there is no overhead for first creating the diary display. Note that the sexp entries must start at the left margin, no whitespace is allowed before them. For example, the following segment of an Org file will be processed and entries will be made in the agenda:

* Birthdays and similar stuff
#+CATEGORY: Holiday
%%(org-calendar-holiday)   ; special function for holiday names
#+CATEGORY: Ann
%%(diary-anniversary  5 14 1956)(84) Arthur Dent is %d years old
%%(diary-anniversary 10  2 1869) Mahatma Gandhi would be %d

Anniversaries from BBDB

If you are using the Big Brothers Database to store your contacts, you will very likely prefer to store anniversaries in BBDB rather than in a separate Org or diary file. Org supports this and will show BBDB anniversaries as part of the agenda. All you need to do is to add the following to one your your agenda files:

* Anniversaries
  :PROPERTIES:
  :CATEGORY: Anniv
  :END:
%%(org-bbdb-anniversaries)

You can then go ahead and define anniversaries for a BBDB record. Basically, you need to press C-o anniversary RET with the cursor in a BBDB record and then add the date in the format YYYY-MM-DD, followed by a space and the class of the anniversary (‘birthday’ or ‘wedding’, or a format string). If you omit the class, it will default to ‘birthday’. Here are a few examples, the header for the file ‘org-bbdb.el’ contains more detailed information.

1973-06-22
1955-08-02 wedding
2008-04-14 %s released version 6.01 of org-mode, %d years ago

After a change to BBDB, or for the first agenda display during an Emacs session, the agenda display will suffer a short delay as Org updates its hash with anniversaries. However, from then on things will be very fast--much faster in fact than a long list of ‘%%(diary-anniversary)’ entries in an Org or Diary file.

Appointment reminders

Org can interact with Emacs appointments notification facility. To add all the appointments of your agenda files, use the command org-agenda-to-appt. This command also lets you filter through the list of your appointments and add only those belonging to a specific category or matching a regular expression. See the docstring for details.

ISBN 9781906966089The Org Mode 7 Reference ManualSee the print edition