;ELC ;;; compiled by kwzh@nutrimat.gnu.ai.mit.edu on Wed Jul 17 16:58:18 1996 ;;; from file /gd/gnu/emacs/19.0/lisp/gnus-gl.el ;;; emacs version 19.31.94.1. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`gnus-gl.el' was compiled for Emacs 19.29 or later")) (byte-code "!!" [require gnus-score cl] 2) #@58 *The line format spec in summary GroupLens mode buffers. (defvar gnus-summary-grouplens-line-format "%U%R%z%l%I%(%[%4L: %-20,20n%]%) %s\n" (#$ . -527)) #@79 User's pseudonym. This pseudonym is obtained during the registration process (defvar grouplens-pseudonym "" (#$ . 685)) #@32 Host where the bbbd is running (defvar grouplens-bbb-host "grouplens.cs.umn.edu" (#$ . 812)) #@34 Port where the bbbd is listening (defvar grouplens-bbb-port 9000 (#$ . 911)) #@52 *Groups that are part of the GroupLens experiment. (defvar grouplens-newsgroups (quote ("comp.lang.c++" "rec.humor" "rec.food.recipes" "comp.groupware" "mn.general" "rec.arts.movies" "rec.arts.movies.current-films" "comp.lang.java" "comp.os.linux.announce" "comp.os.linux.misc" "comp.os.linux.development.apps" "comp.os.linux.development.system")) (#$ . -994)) #@514 valid values are: prediction-spot -- an * corresponding to the prediction between 1 and 5, confidence-interval -- a numeric confidence interval prediction-bar -- |##### | the longer the bar, the better the article, confidence-bar -- | ----- } the prediction is in the middle of the bar, confidence-spot -- ) * | the spot gets bigger with more confidence, prediction-num -- plain-old numeric value, confidence-plus-minus -- prediction +/i confidence (defvar grouplens-prediction-display (quote prediction-spot) (#$ . 1362)) #@337 Offset the prediction by this value. Setting this variable to -2 would have the following effect on GroupLens scores: 1 --> -2 2 --> -1 3 --> 0 4 --> 1 5 --> 2 The reason is that a user might want to do this is to combine GroupLens predictions with scores calculated by other score methods. (defvar grouplens-score-offset 0 (#$ . 1956)) #@121 This variable allows the user to magnify the effect of GroupLens scores. The scale factor is applied after the offset. (defvar grouplens-score-scale-factor 1 (#$ . 2345)) #@323 Tell Grouplens to override the normal Gnus scoring mechanism. GroupLens scores can be combined with gnus scores in one of three ways. 'override -- just use grouplens predictions for grouplens groups 'combine -- combine grouplens scores with gnus scores 'separate -- treat grouplens scores completely separate from gnus (defvar gnus-grouplens-override-scoring (quote override) (#$ . 2524)) #@30 Current session token number (defvar grouplens-bbb-token "0" (#$ . 2922)) #@51 Process Id of current bbbd network stream process (defvar grouplens-bbb-process nil (#$ . 3002)) #@41 Buffer associated with the BBBD process (defvar grouplens-bbb-buffer nil (#$ . 3105)) #@41 Current set of message-id rating pairs (defvar grouplens-rating-alist nil (#$ . 3197)) (byte-code "! $B!B!+\nB!: Bɇ" [boundp grouplens-current-hashtable make-hash-table :test equal :size 100 current-load-list grouplens-current-group nil bbb-mid-list bbb-alist] 5) #@126 Number of seconds to wait for some response from the BBB. If this times out we give up and assume that something has died... (defvar bbb-timeout-secs 10 (#$ . 3520)) #@38 Message-ID of the last article read. (defvar grouplens-previous-article nil (#$ . 3692)) (byte-code " B B" [bbb-read-point current-load-list bbb-response-point] 2) (defalias 'bbb-connect-to-bbbd #[(host port) "\f\"!q!e)q ) ˍ " [grouplens-bbb-buffer get-buffer-create format " *BBBD trace: %s*" host make-local-variable bbb-read-point erase-buffer nil grouplens-bbb-process done (byte-code " \"qe !!\")Ƈ" [error (byte-code "\n \f$" [open-network-stream "BBBD" grouplens-bbb-buffer host port grouplens-bbb-process] 5) ((error (gnus-message 3 "Error: Failed to connect to BBB"))) grouplens-bbb-process throw done nil grouplens-bbb-buffer bbb-read-point bbb-read-response] 3)] 4]) (defalias 'bbb-send-command #[(process command) "dbcc`` !`Ɠ \" \"" [command " \n" bbb-read-point bbb-response-point process-mark process nil process-send-string] 3]) #@70 This function eats the initial response of OK or ERROR from the BBB. (defalias 'bbb-read-response #[(process) " b# \" b` b !*" [nil match-end case-fold-search bbb-read-point search-forward " \n" t accept-process-output process bbb-timeout-secs looking-at "OK"] 4 (#$ . 4622)]) #@70 return the token number if login is successful, otherwise return nil (defalias 'bbb-login #[nil "\nÚ9 \"5!q\nP\"!/ 4\"))>\" " [nil grouplens-bbb-token grouplens-pseudonym "" bbb-connect-to-bbbd grouplens-bbb-host grouplens-bbb-port bbb-process process-buffer bbb-send-command "login " bbb-read-response bbb-extract-token-number gnus-message 3 "Error: Grouplens login failed" "Error: you must set a pseudonym"] 5 (#$ . 4934) nil]) (defalias 'bbb-extract-token-number #[nil "#!\fǕ{)" [search-forward "token=" nil t token-pos looking-at "[0-9]+" 0] 4]) (gnus-add-shutdown (quote bbb-logout) (quote gnus)) #@23 logout of bbb session (defalias 'bbb-logout #[nil " \n\" !q P\" !))" [bbb-connect-to-bbbd grouplens-bbb-host grouplens-bbb-port bbb-process process-buffer bbb-send-command "logout " grouplens-bbb-token bbb-read-response] 5 (#$ . 5597)]) #@372 this function can be called as part of the function to return the list of score files to use. See the gnus variable gnus-score-find-score-files-function. *Note:* If you want to use grouplens scores along with calculated scores, you should see the offset and scale variables. At this point, I don't recommend using both scores and grouplens predictions together. (defalias 'bbb-build-mid-scores-alist #[(groupname) "\n \f\"C\"*CCC" [groupname grouplens-current-group grouplens-newsgroups bbb-get-all-mids mid-list bbb-get-predictions predict-list nil grouplens-previous-article append "message-id"] 3 (#$ . 5857)]) #@60 Ask the bbb for predictions, and build up the score alist. (defalias 'bbb-get-predictions #[(midlist groupname) "\n\"Ň\" \n#\f \"V!q\"!M!U\" )+" [grouplens-bbb-token "0" gnus-message 3 "Error: You are not logged in to a BBB" nil 5 "Fetching Predictions..." bbb-build-predict-command midlist groupname bbb-connect-to-bbbd grouplens-bbb-host grouplens-bbb-port bbb-process predict-command predict-list process-buffer bbb-send-command bbb-read-response bbb-get-prediction-response 1 "Invalid Token, login and try again" ding bbb-alist] 5 (#$ . 6507)]) (defalias 'bbb-get-all-mids #[nil "\n\"A@ ĉ 0@HA  B  ," [assoc "message-id" gnus-header-index gnus-newsgroup-headers nil this art articles index bbb-mid-list] 5]) (defalias 'bbb-build-predict-command #[(mlist grpname token) " İ'@QAP*" ["getpredictions " token " " grpname " \n" nil art cmd mlist ". \n"] 6]) (defalias 'bbb-get-prediction-response #[(process) " b# \" b`\n\\b *" [nil match-end case-fold-search bbb-read-point search-forward ". \n" t accept-process-output process bbb-timeout-secs bbb-response-point 4 bbb-build-response-alist] 4]) (defalias 'bbb-build-response-alist #[nil "`\f$!# \fBB\nBy !G BB\nB E#y !i BB\nB ׉E#y \n*" [nil match-end resp make-hash-table :test equal :size 100 grouplens-current-hashtable looking-at "\\(<.*>\\) :nopred=" bbb-get-mid gnus-summary-default-score (nil s) 1 "\\(<.*>\\) :pred=\\([0-9].[0-9][0-9]\\) :conflow=\\([0-9].[0-9][0-9]\\) :confhigh=\\([0-9].[0-9][0-9]\\)" bbb-get-pred (nil s) cl-puthash bbb-get-confl bbb-get-confh "\\(<.*>\\) :pred=\\([0-9].[0-9][0-9]\\)" (nil s) 0] 5]) (defalias 'bbb-get-mid #[nil "{" [1] 2]) (defalias 'bbb-get-pred #[nil "{!V \n\\_!)" [string-to-number 2 tpred 0 round grouplens-score-scale-factor grouplens-score-offset 1] 5]) (defalias 'bbb-get-confl #[nil "{!" [string-to-number 3] 3]) (defalias 'bbb-get-confh #[nil "{!" [string-to-number 4] 3]) (byte-code "\nB\nB\nB\nB\nB" [4.0 grplens-rating-range current-load-list 5 grplens-maxrating 1 grplens-minrating 12 grplens-predstringsize gnus-tmp-score] 2) (defalias 'bbb-grouplens-score #[(header) "=\n !\" \n\"A@H \f:E\"@?@AA)N#+A@AA@IIߚWV!, ,㚃\"8嚃#8皃\"8隃\"8욃\"8ߚ!8$#8\"8II." [gnus-grouplens-override-scoring separate bbb-grouplens-other-score header make-string 12 32 rate-string assoc "message-id" gnus-header-index mid grouplens-current-hashtable nil def table key cl-hash-lookup found cl-builtin-gethash hashent gnus-tmp-score iscore low high 0 124 11 grouplens-current-group grouplens-newsgroups grouplens-prediction-display prediction-num 1 5 bbb-valid-score prediction-spot bbb-fmt-prediction-spot confidence-interval bbb-fmt-confidence-interval prediction-bar bbb-fmt-prediction-bar confidence-bar format "| %4.2f |" confidence-spot bbb-fmt-prediction-num confidence-plus-minus bbb-fmt-confidence-plus-minus gnus-message 3 "Invalid prediction display type" 78 6 65] 6]) (defalias 'bbb-grouplens-other-score #[(header) " ‡\"\n\"A@H \f:D\"@>@A@)M#+@VA@8IIݚWVII'㚃\"'嚃#'皃\"'隃\"'욃\"'ݚ!'#'\"II." [grouplens-current-group grouplens-newsgroups "" make-string 12 32 rate-string header assoc "message-id" gnus-header-index mid grouplens-current-hashtable nil def table key cl-hash-lookup found cl-builtin-gethash hashent 0 pred low 2 high 124 11 grouplens-prediction-display prediction-num 1 5 78 6 65 prediction-spot bbb-fmt-prediction-spot confidence-interval bbb-fmt-confidence-interval prediction-bar bbb-fmt-prediction-bar confidence-bar format "| %4.2f |" confidence-spot bbb-fmt-prediction-num confidence-plus-minus bbb-fmt-confidence-plus-minus gnus-message 3 "Invalid prediction display type"] 6]) (defalias 'bbb-valid-score #[(score) "\n Y\n\fX" [grouplens-prediction-display prediction-num score grplens-minrating grplens-maxrating] 2]) (defalias 'bbb-requires-confidence #[(format-type) "šÚ" [format-type confidence-plus-minus confidence-spot confidence-interval] 2]) (defalias 'bbb-have-confidence #[(clow chigh) "? ??" [clow chigh] 1]) (defalias 'bbb-fmt-prediction-spot #[(rate-string score) "\n Z\f Z\\_!I" [rate-string round score grplens-minrating grplens-rating-range grplens-predstringsize 4 1.49 42] 5]) (defalias 'bbb-fmt-confidence-interval #[(score low high) " \n\" \n#!" [bbb-have-confidence low high format "|%4.2f-%4.2f |" bbb-fmt-prediction-num score] 4]) (defalias 'bbb-fmt-confidence-plus-minus #[(score low high) " \n\" \n Zƥ# !" [bbb-have-confidence low high format "|%3.1f+/-%4.2f|" score 2.0 bbb-fmt-prediction-num] 5]) (defalias 'bbb-fmt-prediction-bar #[(rate-string score) "\n ZƥZ ZW@\n V- I3 I \\ \\ , " [1 i grplens-rating-range grplens-predstringsize 4 step 2 half-step grplens-minrating loc score rate-string 35 32] 4]) (defalias 'bbb-fmt-prediction-num #[(score) "\n\"" [format "| %4.2f |" score] 3]) (defalias 'bbb-put-ratings #[nil "N \nN\f \"!H!q\"\"!8@\" \")L\"*ω" [grouplens-rating-alist gnus-newsgroup-name grouplens-newsgroups bbb-connect-to-bbbd grouplens-bbb-host grouplens-bbb-port bbb-build-rate-command rate-command bbb-process process-buffer gnus-message 5 "Sending Ratings..." bbb-send-command bbb-read-response nil 1 "Token timed out: call bbb-login and quit again" ding "Sending Ratings...Done" 3 "No BBB connection"] 4]) (defalias 'bbb-build-rate-command #[(rate-alist) "\n\fŰ4@@A@AA̰AP*" [nil "putratings " grouplens-bbb-token " " grouplens-current-group " \n" cmd this rate-alist " :rating=" ".00" " :time=" " \n" ". \n"] 9]) (defalias 'bbb-summary-rate-article #[(rating &optional midin) " Q\n\f  L YL XL\fL\f \"\n8\n BB\f BB B !\")P\")" [gnus-newsgroup-name grouplens-newsgroups midin bbb-get-current-id mid rating grplens-minrating grplens-maxrating assoc grouplens-rating-alist oldrating 0 gnus-summary-mark-article nil int-to-string gnus-message 3 "Invalid rating"] 5 nil "nRating: "]) #@42 Select unread article after current one. (defalias 'grouplens-next-unread-article #[(rating) "! " [rating bbb-summary-rate-article gnus-summary-next-unread-article] 2 (#$ . 13302) "P"]) #@42 Select unread article after current one. (defalias 'grouplens-best-unread-article #[(rating) "! " [rating bbb-summary-rate-article gnus-summary-best-unread-article] 2 (#$ . 13503) "P"]) #@158 Mark all articles not marked as unread in this newsgroup as read, then exit. If prefix argument ALL is non-nil, all articles are marked as read. (defalias 'grouplens-summary-catchup-and-exit #[(rating) "! !" [rating bbb-summary-rate-article gnus-summary-catchup-and-exit] 2 (#$ . 13705) "P"]) #@67 Raise the score of the articles in the current thread with SCORE. (defalias 'grouplens-score-thread #[(score) " ' @!  @ 8H\" A\n)`)\f\"!: b* !" [nil e gnus-summary-articles-in-thread articles gnus-summary-goto-subject gnus-set-global-variables bbb-summary-rate-article score 3 gnus-newsgroup-data 4 t gnus-summary-check-current zerop gnus-summary-next-subject 1 gnus-summary-recenter gnus-summary-position-point gnus-set-mode-line summary] 6 (#$ . 14033) "nRating: "]) (defalias 'bbb-get-current-id #[nil "  \"A@H\"" [gnus-current-headers assoc "message-id" gnus-header-index gnus-message 3 "You must select an article before you rate it"] 4]) #@41 Say whether GROUP is a GroupLens group. (defalias 'bbb-grouplens-group-p #[(group) " ‡Ç" [group grouplens-newsgroups " (GroupLens Enhanced)" ""] 2 (#$ . 14736)]) (byte-code "! B‡" [boundp grouplens-current-starting-time nil current-load-list] 2) (defalias 'grouplens-start-timer #[nil " " [current-time grouplens-current-starting-time] 2]) (defalias 'grouplens-elapsed-time #[nil " ! !Z)" [bbb-time-float current-time et grouplens-current-starting-time] 4]) (defalias 'bbb-time-float #[(timeval) "@_A@\\" [timeval 65536] 2]) (defalias 'grouplens-do-time #[nil " 7\n0 \n \"%\nBB B/A@B* " [gnus-newsgroup-name grouplens-newsgroups grouplens-previous-article grouplens-elapsed-time assoc grouplens-rating-alist oldrating elapsed-time 0 grouplens-start-timer bbb-get-current-id] 4]) (byte-code "\nB\nB" ["gnus-gl.el 2.12" gnus-gl-version current-load-list "grouplens-bug@cs.umn.edu" gnus-gl-maintainer-address] 2) #@41 Submit via mail a bug report on gnus-gl (defalias 'gnus-gl-submit-bug-report #[nil "! Pϯ\n%" [require reporter reporter-submit-bug-report gnus-gl-maintainer-address "gnus-gl.el " gnus-gl-version grouplens-pseudonym grouplens-bbb-host grouplens-bbb-port grouplens-newsgroups grouplens-bbb-token grouplens-bbb-process grouplens-current-group grouplens-previous-article grouplens-mid-list bbb-alist nil gnus-gl-get-trace] 13 (#$ . 15729) nil]) #@46 Insert the contents of the BBBD trace buffer (defalias 'gnus-gl-get-trace #[nil "!" [grouplens-bbb-buffer insert-buffer] 2 (#$ . 16195)]) #@73 Minor mode for providing a GroupLens interface in Gnus summary buffers. (defvar gnus-grouplens-mode nil (#$ . 16346)) (byte-code "! B  \"‡" [boundp gnus-grouplens-mode-map nil current-load-list make-keymap gnus-define-keys-1 ("n" grouplens-next-unread-article "r" bbb-summary-rate-article "k" grouplens-score-thread "c" grouplens-summary-catchup-and-exit "," grouplens-best-unread-article)] 3) (defalias 'gnus-grouplens-make-menu-bar #[nil "!? ! B#$" [boundp gnus-grouplens-menu nil current-load-list put variable-documentation "" easy-menu-do-define 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 t] ["Report bugs" gnus-gl-submit-bug-report t])] 5]) #@73 Minor mode for providing a GroupLens interface in Gnus summary buffers. (defalias 'gnus-grouplens-mode #[(&optional arg) "=\n ! ? !V!3\">!$!L\"W!$!={