*** /tmp/T0a006YJ Thu Feb 15 14:49:43 1996 --- gnus-gl.el Thu Feb 15 14:38:50 1996 *************** *** 493,498 **** --- 493,566 ---- (aset rate-string 5 ?N) (aset rate-string 6 ?A)) rate-string)) + ;; + ;; Gnus user format function that doesn't depend on + ;; bbb-build-mid-scores-alist being used as the score function, but is + ;; instead called from gnus-select-group-hook. -- LAB + (defun gnus-user-format-function-L (header) + (if (not (member grouplens-current-group grouplens-newsgroups)) + ;; Return an empty string + "" + (let* ((rate-string (make-string 12 ? )) + (mid + (aref header + (nth 1 (assoc "message-id" gnus-header-index)))) + (hashent (gethash mid grouplens-current-hashtable)) + (pred (nth 0 hashent)) + (low (nth 1 hashent)) + (high (nth 2 hashent))) + + ;; Init rate-string + (aset rate-string 0 ?|) + (aset rate-string 11 ?|) + + ;; If no entry in BBB hash mark rate string as NA and return + (if (null hashent) + (progn + (aset rate-string 5 ?N) + (aset rate-string 6 ?A) + rate-string) + ;; Otherwise + (cond + ;; prediction-spot + ((equal grouplens-prediction-display 'prediction-spot) + (fmt-prediction-spot rate-string pred)) + + ;; confidence-interval + ((equal grouplens-prediction-display 'confidence-interval) + (fmt-confidence-interval pred low high)) + + ;; prediction-bar + ((equal grouplens-prediction-display 'prediction-bar) + (fmt-prediction-bar rate-string pred)) + + ;; confidence-bar + ((equal grouplens-prediction-display 'confidence-bar) + (format "| %4.2f |" pred)) + + ;; confidence-spot + ((equal grouplens-prediction-display 'confidence-spot) + (format "| %4.2f |" pred)) + + ;; prediction-num + ((equal grouplens-prediction-display 'prediction-num) + (fmt-prediction-num pred)) + + ;; confidence-plus-minus + ((equal grouplens-prediction-display 'confidence-plus-minus) + (fmt-confidence-plus-minus pred low high)) + + (t + (gnus-message 3 "Invalid prediction display type") + (aset rate-string 0 ?|) + (aset rate-string 11 ?|) + rate-string) + ) + ) + ) + ) + ) + (defun grouplens-valid-score (score) (if (equal grouplens-prediction-display 'prediction-num) t