Often it is useful to be able to show the user a short one-line message,
this is what the message function does.
If display-now is non-nil the message is rendered into the
window immediately, otherwise it will not be visible until the next
general redisplay (usually after each command exits).
Note that an alternate way of writing in the status line is to use
the output stream t. See section Output Streams.
When writing interactive programs it is sometimes useful to be able to render the cursor in the status line. This shows that the next key press will not be subject to normal editing key bindings but to the special user interface (usually explained by a message in the status line).
For example the y-or-n-p function uses this technique to
show that it needs an answer.
nil the window's cursor is
rendered at the end of the message in the status line, not at the cursor's
position in the main display.
Another way of alerting the user is to use the beep function,
Go to the first, previous, next, last section, table of contents.