From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82510 Path: news.gmane.org!not-for-mail From: Jan Tatarik Newsgroups: gmane.emacs.gnus.general Subject: Re: [gnus git] branch master updated: m0-5-112-gb0e097a =1= Allow scoring on decoded (base64, etc) bodies. Date: Fri, 16 Nov 2012 10:25:31 +0100 Message-ID: <5n5x2r3909c31w.fsf@nb-jtatarik2.xing.hh> References: <87a9ul60hm.fsf@silenus.orebokech.com> <5n5x2rpq3gwlo8.fsf@nb-jtatarik2.xing.hh> <87d2zdykto.fsf@silenus.orebokech.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1353057991 13134 80.91.229.3 (16 Nov 2012 09:26:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Nov 2012 09:26:31 +0000 (UTC) Cc: Lars Ingebrigtsen , GNUS mailing list To: Romain Francoise Original-X-From: ding-owner+M30776@lists.math.uh.edu Fri Nov 16 10:26:40 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TZIC7-0004bB-7a for ding-account@gmane.org; Fri, 16 Nov 2012 10:26:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1TZIBL-0001v0-2s; Fri, 16 Nov 2012 03:25:51 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1TZIBJ-0001uj-3l for ding@lists.math.uh.edu; Fri, 16 Nov 2012 03:25:49 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1TZIBH-0007Is-1e for ding@lists.math.uh.edu; Fri, 16 Nov 2012 03:25:48 -0600 Original-Received: from mail-ea0-f172.google.com ([209.85.215.172]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1TZIB9-0007Bt-Bo; Fri, 16 Nov 2012 10:25:39 +0100 Original-Received: by mail-ea0-f172.google.com with SMTP id a1so253842eaa.17 for ; Fri, 16 Nov 2012 01:25:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=78kcj4B3BpKLfCgDQS/okJfIHQoS2RLk6oBf/1pO6sY=; b=mYtB0BZUL4i7oxVmAYO06dhvgEpzyb2YGiAU9CLDBht3V6clkVz2zZG6oeHVeRgDzk f2s7twBqQww22aCGs4HV3f+J5V/RF1+CK44zkpg3yFAIpr9ms+uNO+xiBdkq3tsDAgmg rk3RCEGFw5+8toYXizuUmlBczD8FSAjL155/IPiV6aLwGKarRultSNCnpiQNgpyiWd5+ m8IymixXxiFPwyPze/CWSdEoL7zFM7Coetj1R58+qe6/1pP25bR40PKtZX5psBWXEicz Fbwat9wqlBm9l9QDl69S+1r3qqbGmCcaz3B9Kj0nDSBmlXpTEPnP7w9PvGrWGgt9RrYW Z6tw== Original-Received: by 10.14.205.3 with SMTP id i3mr11945310eeo.18.1353057933910; Fri, 16 Nov 2012 01:25:33 -0800 (PST) Original-Received: from nb-jtatarik2.xing.hh (office.xing.com. [82.112.107.65]) by mx.google.com with ESMTPS id g5sm2380618eem.4.2012.11.16.01.25.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 16 Nov 2012 01:25:33 -0800 (PST) In-Reply-To: <87d2zdykto.fsf@silenus.orebokech.com> (Romain Francoise's message of "Fri, 16 Nov 2012 10:10:43 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-Spam-Score: -3.0 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82510 Archived-At: --=-=-= Content-Type: text/plain On Fri, Nov 16 2012, Romain Francoise wrote: > Jan Tatarik writes: >> Yes, that was my change breaking this. The attached patch should fix >> this. > Works for me, thanks. You have copyright papers on file, so if you provide > a fitting ChangeLog entry I can install that for you, if you like. Here you go. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=score-by-body-not-headers.patch diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 97d9a6812d5c91b9c591700a15c12467ecc77c50..a0bdde85bc3acb20749fb92ff64c58aeb5a9a862 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-11-16 Jan Tatarik + + * gnus-score.el (gnus-score-body): + * gnus-logic.el (gnus-advanced-body): Don't score by headers when + scoring by body. + 2012-11-08 Katsumi Yamaoka * gnus-art.el (gnus-article-browse-html-parts): Always replace charset diff --git a/lisp/gnus-logic.el b/lisp/gnus-logic.el index a440b7799303ddf46674c35c20f5bba51388b50c..60d7b31713b192f821060a8b463b6e771c4ea29f 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 - (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)) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index f215b84551499cee6de7a0f67beac8251a9e2ce2..b70619608399d547eca394b2e2511ec74c65b280 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 - (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 --=-=-=--