* Organized Learning
@ 2003-09-22 21:08 Artist
2003-09-24 1:56 ` Jesper Harder
2003-10-14 21:15 ` Kai Grossjohann
0 siblings, 2 replies; 13+ messages in thread
From: Artist @ 2003-09-22 21:08 UTC (permalink / raw)
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..
full detail at www.stumbleupon.com
Question: How we can converge the theme of the application with emacs
to learn new emacs things or even the emacs newsgroups or posting of
featurs.
Thanks,
artist.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Organized Learning
2003-09-22 21:08 Organized Learning Artist
@ 2003-09-24 1:56 ` Jesper Harder
2003-09-24 18:20 ` Kevin Rodgers
` (2 more replies)
2003-10-14 21:15 ` Kai Grossjohann
1 sibling, 3 replies; 13+ messages in thread
From: Jesper Harder @ 2003-09-24 1:56 UTC (permalink / raw)
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)))))))
You could invoke it in .emacs to stumble upon a random command every
time you start Emacs. keywiz.el¹ is another way to learn about new
commands (and remember their key bindings).
¹ <http://purl.org/harder/keywiz.el>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Organized Learning
2003-09-24 1:56 ` Jesper Harder
@ 2003-09-24 18:20 ` Kevin Rodgers
2003-09-24 22:26 ` Dan Anderson
` (3 more replies)
2003-09-25 13:03 ` Kevin Dziulko
2003-09-25 20:18 ` Artist
2 siblings, 4 replies; 13+ messages in thread
From: Kevin Rodgers @ 2003-09-24 18:20 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1115 bytes --]
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:
[-- Attachment #2: totd.el --]
[-- Type: text/plain, Size: 617 bytes --]
(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))))))))
[-- Attachment #3: Type: text/plain, Size: 151 bytes --]
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Organized Learning
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>
` (2 subsequent siblings)
3 siblings, 0 replies; 13+ messages in thread
From: Dan Anderson @ 2003-09-24 22:26 UTC (permalink / raw)
Cc: help-gnu-emacs
I put your code in my .emacs and it didn't display a tip of the day on
startup (is it supposed to?). What would I do to get it to display a
tip of the day on startup?
Thanks,
-Dan
^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <mailman.673.1064442401.21628.help-gnu-emacs@gnu.org>]
* Re: Organized Learning
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-25 8:40 ` Adam Hardy
[not found] ` <mailman.696.1064479254.21628.help-gnu-emacs@gnu.org>
3 siblings, 0 replies; 13+ messages in thread
From: Adam Hardy @ 2003-09-25 8:40 UTC (permalink / raw)
Cc: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <mailman.696.1064479254.21628.help-gnu-emacs@gnu.org>]
* Re: Organized Learning
2003-09-24 1:56 ` Jesper Harder
2003-09-24 18:20 ` Kevin Rodgers
@ 2003-09-25 13:03 ` Kevin Dziulko
2003-09-25 20:18 ` Artist
2 siblings, 0 replies; 13+ messages in thread
From: Kevin Dziulko @ 2003-09-25 13:03 UTC (permalink / raw)
Can I put this function into a .el file? I tried but I get a message that
reads "Symbol's function definition is void: loop"
Also, I use emacs just as an editor, and not as an environment, so how can
I make it so it truely only gets displayed once a day, no matter how many
times I start emacs?
Thanks!
On Wed, 24 Sep 2003, 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)))))))
>
> You could invoke it in .emacs to stumble upon a random command every
> time you start Emacs. keywiz.el¹ is another way to learn about new
> commands (and remember their key bindings).
>
> ¹ <http://purl.org/harder/keywiz.el>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Organized Learning
2003-09-24 1:56 ` Jesper Harder
2003-09-24 18:20 ` Kevin Rodgers
2003-09-25 13:03 ` Kevin Dziulko
@ 2003-09-25 20:18 ` Artist
2 siblings, 0 replies; 13+ messages in thread
From: Artist @ 2003-09-25 20:18 UTC (permalink / raw)
Jesper Harder <harder@myrealbox.com> wrote in message news:<m3zngvuexz.fsf@defun.localdomain>...
> googleartist@yahoo.com (Artist) writes:
.....
>
> This small code snippet (by Dave Pearson) that displays a "tip of the
> day":
....
They both work wonderful. Thanks,
The concept is very good, I am going to learn lot with it.
What I had asked was something like we all can 'use' each other's
finding, but there is lot to learn for oneself from emacs itself.
Some additional funtionality, such as making list of interesting
finding or categorize them according to 'topic' would be nice as well.
Thank you,
artist.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Organized Learning
2003-09-22 21:08 Organized Learning Artist
2003-09-24 1:56 ` Jesper Harder
@ 2003-10-14 21:15 ` Kai Grossjohann
1 sibling, 0 replies; 13+ messages in thread
From: Kai Grossjohann @ 2003-10-14 21:15 UTC (permalink / raw)
Back when I used VM, "I have SEEN the CONSing!" (or something
similar). So if people using VM can do that, why can't newbies today
see the tips?
Or do we BLAME it on the BOSSA NOVA?
:-)
^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <mailman.705.1064496195.21628.help-gnu-emacs@gnu.org>]
* Re: Organized Learning
[not found] <mailman.705.1064496195.21628.help-gnu-emacs@gnu.org>
@ 2003-09-25 15:20 ` Kevin Rodgers
0 siblings, 0 replies; 13+ messages in thread
From: Kevin Rodgers @ 2003-09-25 15:20 UTC (permalink / raw)
Kevin Dziulko wrote:
> Can I put this function into a .el file? I tried but I get a message that
> reads "Symbol's function definition is void: loop"
(require 'cl) before (defun totd ...)
> Also, I use emacs just as an editor, and not as an environment, so how can
> I make it so it truely only gets displayed once a day, no matter how many
> times I start emacs?
You could write the buffer to a file, and then only run the function if there
is no file already written today:
(defadvice totd (after write-file activate)
"Write the *Tip of the day* buffer to a file."
(with-current-buffer "*Tip of the day*"
(write-file "~")))
(or (and (file-exists-p "~/*Tip of the day*")
;; Do (... DAY MONTH YEAR DOW DST ZONE) match?
(equal (nthcdr 3 (decode-time
(nth 5 (file-attributes "~/*Tip of the day*"))))
(nthcdr 3 (decode-time (current-time)))))
(totd))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2003-10-14 21:15 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
[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
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).