Résumé : Remove a dead link.
;;;;;;;; (sit-for 0.2) 10 (princ "Hello world " t) 20 (goto-char 10)
M-x eval-buffer RET
Perhaps I’m not supposed to spill the beans, but…
The hint is expressed poorly. It should say to check out where
(goto-char 10) puts
‘point’ – it’s not the result of its evaluation that is important, but the (side) effect. BTW, you can remove the 10 and 20 – they are only obfuscation. This does the same thing:
;;;;;;;; (sit-for 0.2) (princ "Hello world " t) (goto-char 10)
And so does this:
(sit-for 0.2) (princ "Hello world " t) (goto-char 1)
Final hint: the buffer is not evaluated until the command
‘eval-buffer’ is finished, and that command evaluates the whole buffer.
HTH – DrewAdams
So another clearer variation could be (but this is just like to explain a funny story, it’s not getting anymore funny):
;; make an eval-buffer on it!!! ;; C-g to stop it (sit-for 1) (princ "Hello world " t) (goto-char 1) ;; eval the former expression, its side effect is to go at the beginning of the buffer ;; then start again to eval every expression