(defun totd () (interactive) (with-output-to-temp-buffer "*Tip of the day*" (let* ((symbols (loop for s being the symbols when (or (commandp s) (user-variable-p s)) collect s)) (symbol (nth (random (length symbols)) symbols))) (princ (concat "Your tip for the day is:\n========================\n\n" (cond ((commandp symbol) (concat (describe-function symbol) "\n\nInvoke with:\n\n" (with-temp-buffer (where-is symbol t) (buffer-string)))) ((user-variable-p symbol) (describe-variable symbol))))))))