From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: Organized Learning Date: Wed, 24 Sep 2003 12:20:28 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3F71E06C.7070901@yahoo.com> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------060208040204040600030907" X-Trace: sea.gmane.org 1064428647 2254 80.91.224.253 (24 Sep 2003 18:37:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Sep 2003 18:37:27 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 24 20:37:20 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1A2EVs-00074h-00 for ; Wed, 24 Sep 2003 20:37:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 1A2EUG-0001j9-Lq for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Sep 2003 14:35:40 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!newsfeed.stueberl.de!fu-berlin.de!uni-berlin.de!170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 64 Original-NNTP-Posting-Host: 170.207.51.80 Original-X-Trace: news.uni-berlin.de 1064427621 5817254 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:116841 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:12767 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:12767 This is a multi-part message in MIME format. --------------060208040204040600030907 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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: --------------060208040204040600030907 Content-Type: text/plain; name="totd.el" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="totd.el" (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)))))))) --------------060208040204040600030907 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://mail.gnu.org/mailman/listinfo/help-gnu-emacs --------------060208040204040600030907--