test.el file as below:
(print "hello world!")
M-x eval-buffer. No output can be seen even in
*Messages* buffer. where is the print output for this case?
Nowhere. See the docstring (
C-h f eval-buffer):
(eval-buffer &optional BUFFER PRINTFLAG FILENAME UNIBYTE DO-ALLOW-PRINT)
Execute the accessible portion of current buffer as Lisp code. ...
PRINTFLAG controls printing of output by any output functions in the evaluated code, such as ‘print’, ‘princ’, and ‘prin1’: a value of nil means discard it; anything else is the stream to print to. See Info node ‘(elisp)Output Streams’ for details on streams.
DO-ALLOW-PRINT, if non-nil, specifies that output functions in the evaluated code should work normally even if PRINTFLAG is nil, in which case the output is displayed in the echo area.