2

When posting sample Emacs lisp expressions and corresponding output what is the preferred method of formatting the evaluated code with the corresponding output"

I generally consider the output to be the evaluated value, but the same formatting might be used to depict whatever result is salient (message buffer output, exceptions, inserted text, etc.).

I'm asking mostly out of curiosity, but it may be worth considering as a style recommendation for the Emacs.SE.

Descriptive

(number-sequence 1 5)

Evaluates to

(1 2 3 4 5)

Faux-REPL

> (number-sequence 1 5)
(1 2 3 4 5)

ielm-mode REPL

ELISP> (number-sequence 1 5)
(1 2 3 4 5)

Inline Comment

(number-sequence 1 5) ;; (1 2 3 4 5)

Other forms??

Please add other formats I have missed.

| |
  • Any way you like, would be my preference... – Drew Aug 23 '16 at 18:28
2

Info manual

(progn (prin1 'foo) (princ "\n") (prin1 'bar))
-| foo
-| bar
=> bar
| |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .