Skip to content

Clarification on output of return values and the output of messages in Chapter 2 #16

@entilldaniel

Description

@entilldaniel

First of all, thank you Prot for releasing this book I'm learning a lot.

I have a small suggestion which might depend on the target audience of
this book. The second code example in chapter two might be confusing for a
reader because of what is output to the *Messages* buffer.

(upcase (message "Hello world, the number is %s" (+ 1 1 1)))
;; => "HELLO WORLD, THE NUMBER IS 3"

Unless I have a setting that I'm unaware of the above example results
in two lines.

=> Hello world, the number is 3
=> "HELLO WORLD, THE NUMBER IS 3"

With the fist string being the message and the second being the result
of the whole sexp.

I'd suggest that a small section about what gets output to the
minibuffer and why we see what we see in the *Messages* buffer.

I'd be happy to try to formulate something if you wish.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions