Gnus development mailing list
 help / color / mirror / Atom feed
From: larsi@ifi.uio.no (Lars Magne Ingebrigtsen)
Subject: Re: GroupLens: gnus-gl.el
Date: 16 Feb 1996 19:28:07 +0100	[thread overview]
Message-ID: <w8sag2jxgzs.fsf@eistla.ifi.uio.no> (raw)
In-Reply-To: bmiller@cs.umn.edu's message of 14 Feb 1996 13:00:33 -0600

bmiller@cs.umn.edu (Brad Miller) writes:

> Here is the source. I've tested it under September gnus and gnus 5.x
> 
> Comments and improvements welcome.

*Fab* stuff.  Do you want me to include it in the September
distribution?  

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.

How about doing a closer integration with Gnus?  A
`gnus-use-grouplens' variable, perhaps...   And it'd be nice if one
didn't have to mess with the line format specs.  Perhaps one could
have a `gnus-summary-grouplens-line-format' that's used in the
grouplens mode summary buffers?

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

*** gnus-gl.el~	Fri Feb 16 15:08:23 1996
--- gnus-gl.el	Fri Feb 16 15:20:15 1996
***************
*** 743,746 ****
--- 743,800 ----
  
  ;; end
  
+ (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)


-- 
  "Yes.  The journey through the human heart 
     would have to wait until some other time."


  parent reply	other threads:[~1996-02-16 18:28 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 [this message]
1996-02-21 14:47   ` Dr. Pete Gieser
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=w8sag2jxgzs.fsf@eistla.ifi.uio.no \
    --to=larsi@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).