]> git.eshelyaron.com Git - emacs.git/commitdiff
[Gnus] Don't score by headers when scoring by body
authorJan Tatarik <jan.tatarik@gmail.com>
Fri, 16 Nov 2012 09:44:35 +0000 (10:44 +0100)
committerRomain Francoise <romain@orebokech.com>
Fri, 16 Nov 2012 09:44:35 +0000 (10:44 +0100)
* gnus-score.el (gnus-score-body):
* gnus-logic.el (gnus-advanced-body): Don't score by headers when
scoring by body.

lisp/gnus/ChangeLog
lisp/gnus/gnus-logic.el
lisp/gnus/gnus-score.el

index d1cf22fd9711af04d4aa21f468738ea2575ef539..55d11d4c6b103174dbba0d90bf45ee330995b324 100644 (file)
@@ -1,3 +1,9 @@
+2012-11-16  Jan Tatarik  <jan.tatarik@gmail.com>
+
+       * gnus-score.el (gnus-score-body):
+       * gnus-logic.el (gnus-advanced-body): Don't score by headers when
+       scoring by body.
+
 2012-11-13  Glenn Morris  <rgm@gnu.org>
 
        * gnus-diary.el (nndiary-request-create-group-functions)
index a440b7799303ddf46674c35c20f5bba51388b50c..60d7b31713b192f821060a8b463b6e771c4ea29f 100644 (file)
   (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
-               (intern (concat "request-" header))
-               gnus-newsgroup-name)
+      ;; 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))
index f215b84551499cee6de7a0f67beac8251a9e2ce2..b70619608399d547eca394b2e2511ec74c65b280 100644 (file)
@@ -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
-                      (and (string-match "^gnus-" (symbol-name request-func))
-                           (intern (substring (symbol-name request-func)
-                                              (match-end 0))))
-                      gnus-newsgroup-name)
+             ;; 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