[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tip of the day

From: Tassilo Horn
Subject: Re: Tip of the day
Date: Sun, 24 Jun 2007 22:43:04 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

Adam <address@hidden> writes:

Hi Adam,

> There was a note on regarding a "Tip of the Day"
> prompt.
> I can't see any totd in the Emacs manual, or via C-H help. It sounds a
> nice idea though.

The code was provided in the blog article. Here it is:

--8<---------------cut here---------------start------------->8---
(defun totd ()
  (with-output-to-temp-buffer "*Tip of the day*"
    (let* ((commands (loop for s being the symbols
                           when (commandp s) collect s))
           (command (nth (random (length commands)) commands)))
       (concat "Your tip for the day is:n"
               (describe-function command)
               "nnInvoke with:nn"
                 (where-is command t)
--8<---------------cut here---------------end--------------->8---

When Chuck Norris plays Monopoly, it affects the actual world economy.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]