-->

Previous | Table of Contents | Next

Page 279

appointment reminders.

If you're using X11, you'll automatically run the X11 version of emacs unless you specify the emacs-nox version on the command line to run emacs in your terminal window, for example:

# emacs-nox

After you start the X11 version of emacs, you can view a calendar of the previous, current, and next month through the Display Calendar item on the Tools menu. You can also use the non-X11 emacs command, ESC-x-calendar. Press the Esc key, type an x, then

Figure 18.3. The emacs editor features a built-in calendar with an assortment of calendar tools, including a diary and appointment reminder.



enter the word calendar, and press the Enter key.

Figure 18.3 shows the emacs editor.

You can get help on using emacs' calendar tools by typing the question mark after clicking in the calendar window. A help menu of calendar items will appear. You'll also notice that when you click in the calendar window, the emacs menu bar will change, and offer you a Goto, Holidays, Diary, and Moon menu. You can use the Goto menu to advance the calendar forwards or backwards, or jump to nearly 20 different types of calendars, such as Julian, and even Mayan!

The Holidays menu will either list all the holidays for a range or days or months displayed

Page 280

by the calendar listing at the bottom of the screen, or will mark the holidays by highlighting days of the calendar listing. The Moon menu will list the different phases of the moon.

TIME SAVER
More than 100 different calendar commands are available in emacs. You should also know that in order to receive appointment reminders, emacs must be running. For more information, first try calendar's help, and then use the apropos command from emacs' Help menu to get more detailed information.

You can also use emacs to remind you of important events by using Neil Mager's emacs appointment commands. To set appointment reminders, you must first create an .emacs file in your home directory containing the following:


(setq view-diary-entries-initially t)

(setq appt-issue-message t)

(display-time)

(add-hook `diary-hook `appt-make-list)

Use the File menu to save this file. Then create an emacs diary by starting the calendar mode. After you've enabled the emacs calendar mode, click in the calendar window on a specific day, go to the Diary menu, and select Insert Daily. Your scratch buffer will change to "diary," and you'll find your cursor following text containing the selected date. Make some diary entries, then save the buffer, and exit and restart emacs.

After you restart emacs, you can enter appointment reminders in your diary with the emacs appt-add command. First enter the calendar mode, and click your left mouse button on a specific day. Next, press and release the Esc key, type an x, then type appt-add, and press Enter. You'll be asked for appointment time (hours and minutes). Enter the time. After you press Enter, you'll be prompted for a message. Type in your reminder and press Enter again.

Five minutes before the appointment time on the specified day, emacs will beep and then display a new mode line, informing you of the appointment. Two minutes later, the same thing will happen. You can also manually add reminders to your diary file, for example:


 8:00am Jogging with dog

12:00am Lunch with Cathy

15:00pm Check with car repair shop

You can save these reminders following each date in your diary files. If you want to delete appointments, use the appt-delete command after selecting a specific day. You'll be asked interactively to delete various appointments from your diary.

By using the emacs calendar mode and appointment functions, you can build a history of your appointments in your personal diary. Experiment with different modes, and read the emacs info files for more information.
Time Saver

Previous | Table of Contents | Next