Go to the first, previous, next, last section, table of contents.

The Mark and the Region

The concept of the mark applies to the calendar just as to any other buffer, but it marks a date, not a position in the buffer. The region consists of the days between the mark and point (including the starting and stopping dates).

Set the mark to today's date (calendar-set-mark).
The same.
C-x C-x
Interchange mark and point (calendar-exchange-point-and-mark).
Print the number of days in the current region (calendar-count-days-region).

You set the mark in the calendar, as in any other buffer, by using C-@ or C-SPC (calendar-set-mark). You return to the marked date with the command C-x C-x (calendar-exchange-point-and-mark) which puts the mark where point was and point where mark was. The calendar will be scrolled as necessary, if the marked date was not visible on the screen. This does not change the extent of the region.

To determine the number of days in the region, use M-= (calendar-count-days-region). The numbers of days printed will be inclusive, that is, will include the days specified by mark and point.

The main use of the mark in the calendar is to remember dates that you may want to go back to. To make this feature more useful, the mark ring (@xref{The Mark Ring}) operates exactly as in other buffers: Emacs remembers 16 previous locations of the mark. To return to a marked date, use C-u C-SPC (or C-u C-@); this is the command calendar-set-mark given a numeric argument. It moves point to where the mark was, restores the mark from the ring of former marks, and stores the (previous) point at the end of the mark ring. So, repeated use of this command moves point through all the old marks on the ring, one by one.

Go to the first, previous, next, last section, table of contents.