diary-list-entries

diary-list-entries is an autoloaded compiled Lisp function in `diary-lib.el'.

(diary-list-entries DATE NUMBER &optional LIST-ONLY)

Create and display a buffer containing the relevant lines in `diary-file'.
Selects entries for NUMBER days starting with date DATE. Hides any
other entries using overlays. If NUMBER is less than 1, this function
does nothing.

Returns a list of all relevant diary entries found.
The list entries have the form ((MONTH DAY YEAR) STRING SPECIFIER) where
(MONTH DAY YEAR) is the date of the entry, STRING is the entry text, and
SPECIFIER is the applicability. If the variable `diary-list-include-blanks'
is non-nil, this list includes a dummy diary entry consisting of the empty
string for a date with no diary entries.

If producing entries for multiple dates (i.e., NUMBER > 1), then
this function normally returns the entries from any given diary
file in date order. The entries for any given day are in the
order in which they were found in the file, not necessarily in
time-of-day order. Note that any functions present on the
hooks (see below) may add entries, or change the order. For
example, `diary-include-other-diary-files' adds entries from any
include files that it finds to the end of the original list. The
entries from each file will be in date order, but the overall
list will not be. If you want the entire list to be in time
order, add `diary-sort-entries' to the end of `diary-list-entries-hook'.

After preparing the initial list, hooks run in this order:

`diary-nongregorian-listing-hook' runs for the main diary file,
and each included file. For example, this is the appropriate hook
to process Islamic entries in all diary files.

`diary-list-entries-hook' runs once only, for the main diary file.
For example, this is appropriate for sorting all the entries.
If not using include files, there is no difference from the previous
hook.

`diary-hook' runs last, after the diary is displayed.
This is used e.g. by `appt-check'.

Functions called by these hooks may use the variables ORIGINAL-DATE
and NUMBER, which are the arguments with which this function was called.
Note that hook functions should _not_ use DATE, but ORIGINAL-DATE.
(Sexp diary entries may use DATE - see `diary-list-sexp-entries'.)

This function displays the list using `diary-display-function', unless
LIST-ONLY is non-nil, in which case it just returns the list.