According to the Emacs manual,
M-: evaluates an Emacs Lisp expression and prints the value in the echo area. How can I direct the value to the current buffer instead?
C-u M-: insert the result into current buffer instead of printing it in the echo area.
(eval-expression EXP &optional INSERT-VALUE)
Evaluate EXP and print value in the echo area. When called interactively, read an Emacs Lisp expression and evaluate it. Value is also consed on to front of the variable ‘values’. If the resulting value is an integer, it will be printed in several additional formats (octal, hexadecimal, and character). Optional argument INSERT-VALUE non-nil (interactively, with prefix argument) means insert the result into the current buffer instead of printing it in the echo area.