From: Adam Hardy <emacs@cyberspaceroad.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Organized Learning
Date: Thu, 25 Sep 2003 10:40:11 +0200 [thread overview]
Message-ID: <3F72A9EB.70603@cyberspaceroad.com> (raw)
In-Reply-To: <3F71E06C.7070901@yahoo.com>
Here comes the lisp amateur...... I can't get it to work! When I execute
(totd) it says "(void-function loop)". Have I got to install some
package or something?
On 09/24/2003 08:20 PM Kevin Rodgers wrote:
> Jesper Harder wrote:
>
>> googleartist@yahoo.com (Artist) writes:
>>
>>> I recently came upon a website called Stumbleupon.com where there is
>>> a small toolbar to download and you get different website each time
>>> you click the stumble icon matching to your interest and then you
>>> rate the website etc..
>>>
>>> Question: How we can converge the theme of the application with
>>> emacs to learn new emacs things
>>>
>>
>> This small code snippet (by Dave Pearson) that displays a "tip of the
>> day":
>>
>> (defun totd ()
>> (interactive)
>> (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)))
>> (princ
>> (concat "Your tip for the day is:\n========================\n\n"
>> (describe-function command)
>> "\n\nInvoke with:\n\n"
>> (with-temp-buffer
>> (where-is command t)
>> (buffer-string)))))))
>
>
> That could be extended to describe user options as well as commands:
>
>
> ------------------------------------------------------------------------
>
> (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))))))))
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
--
GNU Emacs 21.3.1 on Linux 2.4.20 RH9
next prev parent reply other threads:[~2003-09-25 8:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-22 21:08 Organized Learning Artist
2003-09-24 1:56 ` Jesper Harder
2003-09-24 18:20 ` Kevin Rodgers
2003-09-24 22:26 ` Dan Anderson
[not found] ` <mailman.673.1064442401.21628.help-gnu-emacs@gnu.org>
2003-09-24 22:48 ` lawrence mitchell
2003-09-24 23:06 ` Kevin Rodgers
2003-09-25 8:40 ` Adam Hardy [this message]
[not found] ` <mailman.696.1064479254.21628.help-gnu-emacs@gnu.org>
2003-09-25 15:01 ` Kevin Rodgers
[not found] ` <3F75B6AC.2020305@cyberspaceroad.com>
2003-09-27 20:29 ` Adam Hardy
2003-09-25 13:03 ` Kevin Dziulko
2003-09-25 20:18 ` Artist
2003-10-14 21:15 ` Kai Grossjohann
[not found] <mailman.705.1064496195.21628.help-gnu-emacs@gnu.org>
2003-09-25 15:20 ` Kevin Rodgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F72A9EB.70603@cyberspaceroad.com \
--to=emacs@cyberspaceroad.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).