[gnus git] branch master updated: m0-5-161-ge16e2dc =1= Don't score by headers when scoring by body

Romain Francoise <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  e16e2dccfd04eb33d02bcae0e2cacdfee0bccbd7 (commit)
      from  0b2dac51c0ade4a5a7b6d3d7a41d8754e15848f8 (commit)


- Log -----------------------------------------------------------------
commit e16e2dccfd04eb33d02bcae0e2cacdfee0bccbd7
Author: Jan Tatarik <[email protected]>
Date:   Fri Nov 16 10:38:52 2012 +0100

    Don't score by headers when scoring by body
    
    * gnus-score.el (gnus-score-body):
    * gnus-logic.el (gnus-advanced-body): Don't score by headers when
    scoring by body.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5ef3ff6..8bcf198 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2012-11-16  Jan Tatarik  <[email protected]>
+
+	* gnus-score.el (gnus-score-body):
+	* gnus-logic.el (gnus-advanced-body): Don't score by headers when
+	scoring by body.
+
 2012-11-14  Katsumi Yamaoka  <[email protected]>
 
 	* dgnushack.el (define-obsolete-variable-alias): Simplify.
diff --git a/lisp/gnus-logic.el b/lisp/gnus-logic.el
index a440b77..60d7b31 100644
--- a/lisp/gnus-logic.el
+++ b/lisp/gnus-logic.el
@@ -181,17 +181,18 @@
   (with-current-buffer nntp-server-buffer
     (let* ((request-func (cond ((string= "head" header)
                                 'gnus-request-head)
-                               ;; We need to peek at the headers to detect the
-                               ;; content encoding
                                ((string= "body" header)
-                                'gnus-request-article)
+                                'gnus-request-body)
                                (t 'gnus-request-article)))
            ofunc article handles)
       ;; Not all backends support partial fetching.  In that case, we
       ;; just fetch the entire article.
-      (unless (gnus-check-backend-function
+      ;; When scoring by body, we need to peek at the headers to detect the
+      ;; content encoding
+      (unless (or (gnus-check-backend-function
                (intern (concat "request-" header))
                gnus-newsgroup-name)
+                  (string= "body" header))
         (setq ofunc request-func)
         (setq request-func 'gnus-request-article))
       (setq article (mail-header-number gnus-advanced-headers))
diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el
index f215b84..b706196 100644
--- a/lisp/gnus-score.el
+++ b/lisp/gnus-score.el
@@ -1762,21 +1762,22 @@ score in `gnus-newsgroup-scored' by SCORE."
                 (all-scores scores)
                 (request-func (cond ((string= "head" header)
                                      'gnus-request-head)
-                                    ;; We need to peek at the headers to detect
-                                    ;; the content encoding
                                     ((string= "body" header)
-                                     'gnus-request-article)
+                                     'gnus-request-body)
                                     (t 'gnus-request-article)))
                 entries alist ofunc article last)
            (when articles
              (setq last (mail-header-number (caar (last articles))))
              ;; Not all backends support partial fetching.  In that case,
              ;; we just fetch the entire article.
-             (unless (gnus-check-backend-function
+             ;; When scoring by body, we need to peek at the headers to detect
+             ;; the content encoding
+             (unless (or (gnus-check-backend-function
                       (and (string-match "^gnus-" (symbol-name request-func))
                            (intern (substring (symbol-name request-func)
                                               (match-end 0))))
                       gnus-newsgroup-name)
+                         (string= "body" header))
                (setq ofunc request-func)
                (setq request-func 'gnus-request-article))
              (while articles

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog     |    6 ++++++
 lisp/gnus-logic.el |   13 +++++++------
 lisp/gnus-score.el |   17 +++++++++--------
 3 files changed, 22 insertions(+), 14 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.