+2003-03-06 Kevin Greiner <kgreiner@xpediantsolutions.com>
+
+ * gnus-agent.el (gnus-agent-fetch-group-1): Added default
+ predicate of `false' to avoid an error when a group defines no
+ predicate. Fixed typo that disabled agent scoring (i.e. the
+ low/high predicates should now work).
+
+2003-03-06 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el: add spam-maybe-spam-stat-load to
+ gnus-get-top-new-news-hook, remove it from gnus-get-new-news-hook
+ (spam-bogofilter-register-with-bogofilter): use
+ spam-bogofilter-spam-switch and spam-bogofilter-ham-switch
+ (spam-bogofilter-spam-switch, spam-bogofilter-ham-switch): new
+ custom variables to replace "-s" and "-n"
+
+ * gnus-group.el (gnus-group-get-new-news): call the new
+ gnus-get-top-new-news-hook hook
+
+ * gnus-start.el (gnus-get-top-new-news-hook): new hook, run ONLY
+ by gnus-get-new-news, NOT by gnus-group-get-new-news-this-group
+
2003-03-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
* mm-uu.el (mm-uu-pgp-encrypted-test): Fix message.
;; Figure out how to select articles in this group
(setq category (gnus-group-category group))
+ (debug)
(setq predicate
(gnus-get-predicate
- (gnus-agent-find-parameter group 'agent-predicate)))
+ (or (gnus-agent-find-parameter group 'agent-predicate)
+ 'false)))
;; If the selection predicate requires scoring, score each header
(unless (memq predicate '(gnus-agent-true gnus-agent-false))
(let ((score-param
- (gnus-agent-find-parameter group 'agent-score)))
+ (gnus-agent-find-parameter group 'agent-score-file)))
;; Translate score-param into real one
(cond
((not score-param))
;; Binding this variable will inhibit multiple fetchings
;; of the same mail source.
(nnmail-fetched-sources (list t)))
+ (gnus-run-hooks 'gnus-get-top-new-news-hook)
(gnus-run-hooks 'gnus-get-new-news-hook)
;; Read any slave files.
:group 'gnus-start
:type 'hook)
+(defcustom gnus-get-top-new-news-hook nil
+ "A hook run just before Gnus checks for new news globally."
+ :group 'gnus-group-new
+ :type 'hook)
+
(defcustom gnus-get-new-news-hook nil
"A hook run just before Gnus checks for new news."
:group 'gnus-group-new
:type 'string
:group 'spam-bogofilter)
+(defcustom spam-bogofilter-spam-switch "-s"
+ "The switch that Bogofilter uses to register spam messages."
+ :type 'string
+ :group 'spam-bogofilter)
+
+(defcustom spam-bogofilter-ham-switch "-n"
+ "The switch that Bogofilter uses to register ham messages."
+ :type 'string
+ :group 'spam-bogofilter)
+
(defcustom spam-bogofilter-bogosity-positive-spam-header "^\\(Yes\\|Spam\\)"
"The regex on `spam-bogofilter-header' for positive spam identification."
:type 'regexp
(if spam-use-dig
(let ((query-result (query-dig query-string)))
(when query-result
- (gnus-message 5 "(DIG): positive blackhole check '%s'" query-result)
+ (gnus-message 5 "(DIG): positive blackhole check '%s'"
+ query-result)
(push (list ip server query-result)
matches)))
;; else, if not using dig.el
;; Add hooks for loading and saving the spam stats
(add-hook 'gnus-save-newsrc-hook 'spam-maybe-spam-stat-save)
- (add-hook 'gnus-get-new-news-hook 'spam-maybe-spam-stat-load)
+ (add-hook 'gnus-get-top-new-news-hook 'spam-maybe-spam-stat-load)
(add-hook 'gnus-startup-hook 'spam-maybe-spam-stat-load))
(file-error (progn
(defun spam-bogofilter-register-with-bogofilter (article-string spam)
"Register an article, given as a string, as spam or non-spam."
(when (stringp article-string)
- (let ((switch (if spam "-s" "-n")))
+ (let ((switch (if spam spam-bogofilter-spam-switch
+ spam-bogofilter-ham-switch)))
(with-temp-buffer
(insert article-string)
(if spam-bogofilter-database-directory