Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Tip of the Day
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  15 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ron Denis  
View profile  
 More options Apr 20 2001, 10:20 am
Newsgroups: gnu.emacs.help
From: Ron Denis <rde...@lucent.com>
Date: 20 Apr 2001 10:16:49 -0400
Local: Fri, Apr 20 2001 10:16 am
Subject: Tip of the Day
Is there a package available (google found none) which could show me
something like a "command/function of the day".

Emacs is digested better in bite sized chunks.

--
Ron Denis
E-mail : rde...@lucent.com
Consultant
Lucent Technologies Inc.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Pearson  
View profile  
 More options Apr 20 2001, 12:31 pm
Newsgroups: gnu.emacs.help
From: davep.n...@davep.org (Dave Pearson)
Date: 20 Apr 2001 16:26:17 GMT
Local: Fri, Apr 20 2001 12:26 pm
Subject: Re: Tip of the Day
* Ron Denis <rde...@lucent.com>:

> Is there a package available (google found none) which could show me
> something like a "command/function of the day".

The race to write `Info-goto-random-emacs-command-node' is probably on right
now....

--
Dave Pearson:                   |     lbdb.el - LBDB interface.
http://www.davep.org/           |  sawfish.el - Sawfish mode.
Emacs:                          |  uptimes.el - Record emacs uptimes.
http://www.davep.org/emacs/     | quickurl.el - Recall lists of URLs.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Pearson  
View profile  
 More options Apr 21 2001, 3:29 am
Newsgroups: gnu.emacs.help, gnu.emacs.sources
Followup-To: gnu.emacs.help
From: davep.n...@davep.org (Dave Pearson)
Date: 21 Apr 2001 07:26:33 GMT
Local: Sat, Apr 21 2001 3:26 am
Subject: Re: Tip of the Day
* Ron Denis <rde...@lucent.com>:

> Is there a package available (google found none) which could show me
> something like a "command/function of the day".

> Emacs is digested better in bite sized chunks.

Thinking about it a little more, one possible quick-n-dirty method of doing
this would be:

-- cut here ----------------------------------------------------------------
(require 'cl)

(defun totd ()
  "Describe a random command."
  (interactive)
  (with-output-to-temp-buffer "*Tip of the day*"
    (princ
     (concat "Your tip for the day is:\n========================\n\n"
             (describe-function
              (let ((commands (loop for s across obarray
                                    when (commandp s) collect s)))
                (nth (random (length commands)) commands)))))))
-- cut here ----------------------------------------------------------------

. o O ( Is there a better method of getting a list of commands? Am I right )
      ( in thinking that elisp doesn't have a "give me a list of commands" )
      ( function? I would have thought there was one but I couldn't see it )
      ( during a quick look.                                               )

--
Dave Pearson:                   |     lbdb.el - LBDB interface.
http://www.davep.org/           |  sawfish.el - Sawfish mode.
Emacs:                          |  uptimes.el - Record emacs uptimes.
http://www.davep.org/emacs/     | quickurl.el - Recall lists of URLs.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Faux_Pseudo  
View profile  
 More options Apr 21 2001, 4:34 am
Newsgroups: gnu.emacs.help
From: Faux_Pse...@24.177.56.253 (Faux_Pseudo)
Date: Sat, 21 Apr 2001 08:34:30 GMT
Local: Sat, Apr 21 2001 4:34 am
Subject: Re: Tip of the Day
Now that is a very cool little bit of code.  Just one more thing thow.
is there a way to have it also display what the keybinding is for the
totd if one is set for it?

--(Once apon a time, in gnu.emacs.help,)--
                --(Dave Pearson said it like only they can.)--

--
--(UIN=66618055)--
--(t...@faux.local_04:45_/home/faux)-- cat .sig
GUI's are for slackers.  ibpconf.sh 6.1 on freshmeat.net  
The easiest way to customize the command line.  By Faux_Pseudo

It's a damn poor mind that can only think of one way to spell a word.
        - Andrew Jackson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Pearson  
View profile  
 More options Apr 21 2001, 8:30 am
Newsgroups: gnu.emacs.help, gnu.emacs.sources
Followup-To: gnu.emacs.help
From: davep.n...@davep.org (Dave Pearson)
Date: 21 Apr 2001 12:27:41 GMT
Local: Sat, Apr 21 2001 8:27 am
Subject: Re: Tip of the Day
* Faux_Pseudo <Faux_Pse...@24.177.56.253>:

> Now that is a very cool little bit of code. Just one more thing thow. is
> there a way to have it also display what the keybinding is for the totd if
> one is set for it?

Again, quick and dirty:

-- cut here ----------------------------------------------------------------
(defun totd ()
  (interactive)
  (with-output-to-temp-buffer "*Tip of the day*"
    (let* ((commands (loop for s across obarray
                           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)))))))
-- cut here ----------------------------------------------------------------

--
Dave Pearson:                   |     lbdb.el - LBDB interface.
http://www.davep.org/           |  sawfish.el - Sawfish mode.
Emacs:                          |  uptimes.el - Record emacs uptimes.
http://www.davep.org/emacs/     | quickurl.el - Recall lists of URLs.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Henrik Enberg  
View profile  
 More options Apr 21 2001, 1:52 pm
Newsgroups: gnu.emacs.help
From: Henrik Enberg <kirneh74+n...@hem.passagen.se>
Date: 21 Apr 2001 19:48:11 +0200
Local: Sat, Apr 21 2001 1:48 pm
Subject: Re: Tip of the Day
Faux_Pse...@24.177.56.253 (Faux_Pseudo):

> Now that is a very cool little bit of code.  Just one more thing thow.
> is there a way to have it also display what the keybinding is for the
> totd if one is set for it?

Stuff this code in your ~/.emacs.

(defadvice describe-function (after show-help act)
  "Append info about key bindings for the described function."
  (when function
    (let* ((inhibit-read-only t)
           (lst (where-is-internal function
                                   overriding-local-map
                                   nil nil))
           (str (mapconcat 'key-description lst "\n")))
      (when (> (length str) 0)
        (set-buffer "*Help*")
        (goto-char (point-max))
        (insert
         (if (= (length lst) 1)
             (format "\n\n%s is bound to: %s" function str)
           (format "\n\n%s is bound to:\n%s" function str)))))))

Henrik
--
Soylent Green is People!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Faux_Pseudo  
View profile  
 More options Apr 22 2001, 4:41 am
Newsgroups: gnu.emacs.help
From: Faux_Pse...@24.177.56.253 (Faux_Pseudo)
Date: Sun, 22 Apr 2001 08:41:32 GMT
Local: Sun, Apr 22 2001 4:41 am
Subject: Re: Tip of the Day
perfect. thanks for that.

now if you wouldn't mind droping everything you are doing and adding a
history function so you can see the previous totds in last to first
order ....  woops sorry about that

but when you say "Again, quick and dirty" it reminds me of one time
linus said "I must be an idiot, it took me 5 minutes to find that bug"
to which some one replied "only 5 minuts?"
and some one else replied: "if you are an idiot then we need some new words
to discribe us mortals."

--(Once apon a time, in gnu.emacs.help,)--
                --(Dave Pearson said it like only they can.)--

--
--(UIN=66618055)--
--(t...@faux.local_04:45_/home/faux)-- cat .sig
GUI's are for slackers.  ibpconf.sh 6.1 on freshmeat.net  
The easiest way to customize the command line.  By Faux_Pseudo

It's a damn poor mind that can only think of one way to spell a word.
        - Andrew Jackson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Pearson  
View profile  
 More options Apr 22 2001, 7:17 am
Newsgroups: gnu.emacs.help
From: davep.n...@davep.org (Dave Pearson)
Date: 22 Apr 2001 09:19:18 GMT
Local: Sun, Apr 22 2001 5:19 am
Subject: Re: Tip of the Day
* Faux_Pseudo <Faux_Pse...@24.177.56.253>:

> now if you wouldn't mind droping everything you are doing and adding a
> history function so you can see the previous totds in last to first order
> .... woops sorry about that

Much better is alphabetic order. Use:

  C-h i m emacs RET m command index RET

You'll be there all day reading tips of the day. ;>

--
Dave Pearson:                   |     lbdb.el - LBDB interface.
http://www.davep.org/           |  sawfish.el - Sawfish mode.
Emacs:                          |  uptimes.el - Record emacs uptimes.
http://www.davep.org/emacs/     | quickurl.el - Recall lists of URLs.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Faux_Pseudo  
View profile  
 More options Apr 22 2001, 8:21 am
Newsgroups: gnu.emacs.help
From: Faux_Pse...@24.177.56.253 (Faux_Pseudo)
Date: Sun, 22 Apr 2001 12:21:04 GMT
Local: Sun, Apr 22 2001 8:21 am
Subject: Re: Tip of the Day
well i probably wont do that but seeing as how i am just now learning
to use lisp i did take what i saw in the code and morphed it with
another bit i found to help me out a little

;; f2 displays tip of the day
(global-set-key [(f2)] (lambda () (interactive) (totd)))    
;; f3 comand-apropos on lisp function at point
(global-set-key [(f3)] (lambda ()
(interactive) (command-apropos (current-word))))

i wouldnt mind getting as good at lisp as i am at bash

--(Once apon a time, in gnu.emacs.help,)--
                --(Dave Pearson said it like only they can.)--

--
--(UIN=66618055)--
--(t...@faux.local_04:45_/home/faux)-- cat .sig
GUI's are for slackers.  ibpconf.sh 6.1 on freshmeat.net  
The easiest way to customize the command line.  By Faux_Pseudo

It's a damn poor mind that can only think of one way to spell a word.
        - Andrew Jackson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Albert REINER  
View profile  
 More options Apr 22 2001, 12:04 pm
Newsgroups: gnu.emacs.help, gnu.emacs.sources
From: "Albert REINER" <Use-Author-Address-Header@[127.1]>
Date: Sat, 21 Apr 2001 18:13:47 +0200
Local: Sat, Apr 21 2001 12:13 pm
Subject: Re: Tip of the Day
Unfortunately this does not seem to be a good "tip of the day":
whenever I startup a new emacs, I get the same sequence of commands.

Also, it would be nice to have the output go to, e.g., the
*scratch*-buffer upon startup, rather than creating an extra buffer.

Albert.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Pearson  
View profile  
 More options Apr 22 2001, 1:32 pm
Newsgroups: gnu.emacs.help, gnu.emacs.sources
Followup-To: gnu.emacs.help
From: davep.n...@davep.org (Dave Pearson)
Date: 22 Apr 2001 17:29:02 GMT
Local: Sun, Apr 22 2001 1:29 pm
Subject: Re: Tip of the Day
* Albert REINER <Use-Author-Address-Header@[127.1]>:

> Unfortunately this does not seem to be a good "tip of the day": whenever I
> startup a new emacs, I get the same sequence of commands.

That's because you need to tell random to use a new seed:

,----[ From the elisp manual entry for `random' ]
|    In Emacs, pseudo-random numbers are generated from a "seed" number.
| Starting from any given seed, the `random' function always generates
| the same sequence of numbers.  Emacs always starts with the same seed
| value, so the sequence of values of `random' is actually the same in
| each Emacs run!  For example, in one operating system, the first call
| to `(random)' after you start Emacs always returns -1457731, and the
| second one always returns -7692030.  This repeatability is helpful for
| debugging.
`----

> Also, it would be nice to have the output go to, e.g., the
> *scratch*-buffer upon startup, rather than creating an extra buffer.

It should be easy enough for you to modify it for your own purposes.

As an aside, Aaron Crane was kind enough to point out that looping over
obarray in the way I was wasn't going to work too well. Given this the code
is probably better written (actually it's probably better totally
re-written, perhaps at some point...) as:

-- cut here ----------------------------------------------------------------
(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)))))))
-- cut here ----------------------------------------------------------------

--
Dave Pearson:                   |     lbdb.el - LBDB interface.
http://www.davep.org/           |  sawfish.el - Sawfish mode.
Emacs:                          |  uptimes.el - Record emacs uptimes.
http://www.davep.org/emacs/     | quickurl.el - Recall lists of URLs.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Rodgers  
View profile  
 More options Apr 23 2001, 1:01 pm
Newsgroups: gnu.emacs.help
From: Kevin Rodgers <kev...@ihs.com>
Date: Mon, 23 Apr 2001 11:01:43 -0600
Local: Mon, Apr 23 2001 1:01 pm
Subject: Re: Tip of the Day

Here's what I've been using:

(defadvice describe-function (after where-is activate)
  "Call `\\[where-is] FUNCTION'."
  (where-is (ad-get-arg 0)))

It doesn't give you the bindings nicely formatted in the *Help* buffer like
Henrik's version does, but it does display them in the echo area even when
the function's docstring is too big to fit in the *Help* window.

--
Kevin Rodgers <kev...@ihs.com>          Lead Software Engineer
Information Handling Services           Electronic Systems Development
15 Inverness Way East, M/S A114         GO BUFFS!
Englewood CO 80112-5776 USA             1+ (303) 397-2807[voice]/705-4258[fax]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Harris  
View profile  
 More options May 1 2001, 8:07 pm
Newsgroups: gnu.emacs.help, gnu.emacs.sources
From: Kevin Harris <khar...@satlug.org>
Date: 01 May 2001 19:01:55 -0500
Local: Tues, May 1 2001 8:01 pm
Subject: Re: Tip of the Day

Dave Pearson <davep.n...@davep.org> writes:

    > * Faux_Pseudo <Faux_Pse...@24.177.56.253>:
    >> Now that is a very cool little bit of code. Just one more thing
    >> thow. is there a way to have it also display what the
    >> keybinding is for the totd if one is set for it?

    > Again, quick and dirty:

[totd.el]

Yeah, that's cool and all, but where's the ASCII paperclip?

kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Faux_Pseudo  
View profile  
 More options May 2 2001, 7:00 am
Newsgroups: gnu.emacs.help
From: Faux_Pse...@24.177.56.253 (Faux_Pseudo)
Date: Wed, 02 May 2001 11:00:09 GMT
Local: Wed, May 2 2001 7:00 am
Subject: Re: Tip of the Day
totd.el is a great idea but even microscrung* has admited defeat with
the paper clip guy and will not be including him in there new
releases.
I would however love to have a ascii paper clip to play with in emacs.
maybe some new major mode based on picture-mode

*sorry about that i dont normaly bad mouth ms in the groups but i have
 had a little much to drink and cant resist right now.  At least it
 wasn't the M$ tritness and i came up with something differant.

--(Once apon a time, in gnu.emacs.help,)--
                --(Kevin Harris said it like only they can.)--

> Dave Pearson <davep.n...@davep.org> writes:

>     > * Faux_Pseudo <Faux_Pse...@24.177.56.253>:
>     >> Now that is a very cool little bit of code. Just one more thing
>     >> thow. is there a way to have it also display what the
>     >> keybinding is for the totd if one is set for it?

>     > Again, quick and dirty:

> [totd.el]

> Yeah, that's cool and all, but where's the ASCII paperclip?

> kevin

--
--(UIN=66618055)--
--(t...@faux.local_04:45_/home/faux)-- cat .sig
GUI's are for slackers.  ibpconf.sh 6.1 on freshmeat.net  
The easiest way to customize the command line.  By Faux_Pseudo

It's a damn poor mind that can only think of one way to spell a word.
        - Andrew Jackson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Pearson  
View profile  
 More options May 2 2001, 9:57 am
Newsgroups: gnu.emacs.help
From: davep.n...@davep.org (Dave Pearson)
Date: 2 May 2001 13:26:57 GMT
Local: Wed, May 2 2001 9:26 am
Subject: Re: Tip of the Day
* Faux_Pseudo <Faux_Pse...@24.177.56.253>:

> I would however love to have a ascii paper clip to play with in emacs.
> maybe some new major mode based on picture-mode

Check DejaGoogleNews for the archives of <URL:news:comp.emacs>. I seem to
remember someone playing around with the idea of a paperclip.el a couple of
years back. Dunno if anything came of it.

--
Dave Pearson:                   |     lbdb.el - LBDB interface.
http://www.davep.org/           |  sawfish.el - Sawfish mode.
Emacs:                          |  uptimes.el - Record emacs uptimes.
http://www.davep.org/emacs/     | quickurl.el - Recall lists of URLs.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »