Gnus development mailing list
 help / color / mirror / Atom feed
From: "Dr. Pete Gieser" <pete@seldon.pog.ufl.edu>
Cc: ding@ifi.uio.no
Subject: Re: GroupLens: gnus-gl.el
Date: Wed, 21 Feb 96 09:47:52 -0500	[thread overview]
Message-ID: <9602211447.AA17096@pog.ufl.edu> (raw)
In-Reply-To: (Your message of 16 Feb 96 19:28:07 N.) <w8sag2jxgzs.fsf@eistla.ifi.uio.no>


> Anyways, it takes some fiddling to install all those hooks and stuff,
> so I whipped up a summary minor mode; patch included below.  The idea
> being that one should just have to put `gnus-grouplens-mode' in
> `gnus-summary-mode-hook' to get the thing working.  One needs a bit
> more than this, though -- `gnus-startup-hook', for instance, has to be
> set before starting Gnus.

I've put 

(add-hook 'gnus-summary-mode-hook 'gnus-grouplens-mode)

in my .gnus, but gnus complains that gnus-grouplens-mode is never defined.
(symbol's definition is void)
What's up?

What do you mean "gnus-startup-hook has to be set before starting Gnus."?

> I haven't tested this patch at all, so it probably doesn't work.  

Probably just me.

> + (defvar gnus-grouplens-mode nil
> +   "Minor mode for providing a GroupLens interface in Gnus summary buffers.")
> + 
> + (defvar gnus-grouplens-mode-map nil)
> + 
> + (unless gnus-grouplens-mode-map
> +   (gnus-define-keys
> +    gnus-grouplens-mode-map
> +    "n" grouplens-next-unread-article
> +    "n" grouplens-next-unread-article
> +    "r" bbb-summary-rate-article
> +    "k" grouplens-score-thread
> +    "," grouplens-best-unread-article))
> + 
> + (defun gnus-grouplens-make-menu-bar ()
> +   (unless (boundp 'gnus-grouplens-menu)
> +     (easy-menu-define
> +      gnus-grouplens-menu gnus-grouplens-mode-map ""
> +      '("GroupLens"
> +        ["Login" bbb-login t]
> +        ["Rate" bbb-summary-rate-article t]
> +        ["Next article" grouplens-next-unread-article t]
> +        ["Best article" grouplens-best-unread-article t]
> +        ["Raise thread" grouplens-score-thread-sept t]
> +        ["Report bugs" gnus-gl-submit-bug-report t]))))
> + 
> + (defun gnus-grouplens-mode (&optional arg)
> +   "Minor mode for providing a GroupLens interface in Gnus summary buffers."
> +   (interactive "P")
> +   (when (eq major-mode 'gnus-summary-mode)
> +     (make-local-variable 'gnus-grouplens-mode)
> +     (setq gnus-grouplens-mode 
> + 	  (if (null arg) (not gnus-grouplens-mode)
> + 	    (> (prefix-numeric-value arg) 0)))
> +     (when gnus-grouplens-mode
> +       (add-hook 'gnus-startup-hook 'bbb-login)
> +       (add-hook 'gnus-exit-gnus-hook 'bbb-logout)
> +       (make-local-hook 'gnus-select-article-hook)
> +       (add-hook 'gnus-select-article-hook 'grouplens-do-time)
> +       (make-local-hook 'bbb-put-ratings)
> +       (add-hook 'gnus-exit-group-hook 'bbb-put-ratings)
> +       (setq gnus-score-find-score-files-function 'bbb-build-mid-scores-alist)
> + 
> +       ;; Set up the menu.
> +       (when (and menu-bar-mode
> + 		 (gnus-visual-p 'grouplens-menu 'menu))
> + 	(gnus-grouplens-make-menu-bar))
> +       (unless (assq 'gnus-grouplens-mode minor-mode-alist)
> + 	(push '(gnus-grouplens-mode " GroupLens") minor-mode-alist))
> +       (unless (assq 'gnus-grouplens-mode minor-mode-map-alist)
> + 	(push (cons 'gnus-grouplens-mode gnus-grouplens-mode-map)
> + 	      minor-mode-map-alist))
> +       (run-hooks 'gnus-grouplens-mode-hook))))
> + 
>   (provide 'gnus-gl)

-- 

Peter Gieser, Ph.D.                    Phone:  (904) 392-5198 ext. 441
POG Statistical Office                 FAX:    (904) 392-8162
104 North Main Street  #600            Email:  pete@pog.ufl.edu
Gainesville, FL 32601                  

                 * Send me email to recieve my PGP public key *



  reply	other threads:[~1996-02-21 14:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-02-14 19:00 Brad Miller
1996-02-14 20:48 ` Lance A. Brown
1996-02-16 18:28 ` Lars Magne Ingebrigtsen
1996-02-21 14:47   ` Dr. Pete Gieser [this message]
1996-02-21 18:24     ` Raja R Harinath
1996-02-22  7:11       ` Patrick Audley
1996-02-25  1:05       ` Lars Magne Ingebrigtsen
1996-02-21 17:44   ` Brad Miller
1996-02-21 21:19     ` Brad Miller
1996-02-25  1:09       ` Lars Magne Ingebrigtsen
     [not found] <ravx4ge5@totally-fudged-out-message-id>
1996-02-15  3:53 ` Brad Miller
1996-02-15 15:31   ` Lance A. Brown

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9602211447.AA17096@pog.ufl.edu \
    --to=pete@seldon.pog.ufl.edu \
    --cc=ding@ifi.uio.no \
    /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 NNTP newsgroup(s).