From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/5155 Path: main.gmane.org!not-for-mail From: larsi@ifi.uio.no (Lars Magne Ingebrigtsen) Newsgroups: gmane.emacs.gnus.general Subject: Re: GroupLens: gnus-gl.el Date: 16 Feb 1996 19:28:07 +0100 Organization: Dept. of Informatics, University of Oslo, Norway Sender: larsi@ifi.uio.no Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035145797 31938 80.91.224.250 (20 Oct 2002 20:29:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:29:57 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.7.3/8.6.9) with SMTP id LAA06888 for ; Fri, 16 Feb 1996 11:34:08 -0800 Original-Received: from eistla.ifi.uio.no (4867@eistla.ifi.uio.no [129.240.94.29]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Fri, 16 Feb 1996 19:28:08 +0100 Original-Received: (from larsi@localhost) by eistla.ifi.uio.no ; Fri, 16 Feb 1996 19:28:07 +0100 Original-To: ding@ifi.uio.no In-Reply-To: bmiller@cs.umn.edu's message of 14 Feb 1996 13:00:33 -0600 Original-Lines: 92 Xref: main.gmane.org gmane.emacs.gnus.general:5155 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:5155 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."