Using Time Management Tools

Emacs may be the only personal information manager you’ll need. It can print the time on the mode line, and the Emacs calendar and diary are more sophisticated than their UNIX equivalents. The calendar displays three months at a time, and you can make a diary of events and appointments that display each day.

Displaying the Time

Keeping track of the time while you’re working can be very useful. You can display the time on the mode line by typing ESC x display-time. To have the time display automatically, add this line to your .emacs file:

(display-time)

The next time you enter Emacs, the time appears on the mode line.

Displaying the Calendar

To display the calendar, type ESC x calendar. Emacs displays a calendar window with three months: last month, this month, and next month.

Type: ESC x calendar

Displaying the Calendar

Emacs puts the cursor on today’s date, and displays the date on the mode line. There’s no room to write on the calendar; that’s what the diary is for, which we’ll discuss shortly.

By default, weeks start on Sunday. If you’d like them to start on Monday instead, type ESC x set-variable calendar-week-start RETURN 1 RETURN. You enter the calendar again to have this take effect. If you’d like to have the calendar always start on Monday, add this line to your .emacs file:

(setq calendar-week-start-day 1)

If you’d like to see the calendar each time you start Emacs, you can ...

Get Learning GNU Emacs, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.