From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 08 04:42:35 2020 Received: (at submit) by debbugs.gnu.org; 8 Sep 2020 08:42:35 +0000 Received: from localhost ([127.0.0.1]:51849 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFZCv-0004cY-WE for submit@debbugs.gnu.org; Tue, 08 Sep 2020 04:42:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:53226) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFSRl-0008MY-Q5 for submit@debbugs.gnu.org; Mon, 07 Sep 2020 21:29:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58826) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFSRl-0000eK-Jx for bug-gnu-emacs@gnu.org; Mon, 07 Sep 2020 21:29:21 -0400 Received: from 50-0-39-243.dsl.static.fusionbroadband.com ([50.0.39.243]:63444 helo=mail.lapseofthought.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFSRh-0004Aa-W2 for bug-gnu-emacs@gnu.org; Mon, 07 Sep 2020 21:29:21 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.lapseofthought.com (Postfix) with ESMTP id 4Blnbq1Dxmz3jhM1 for ; Mon, 7 Sep 2020 18:28:39 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at lapseofthought.com Received: from mail.lapseofthought.com ([127.0.0.1]) by localhost (mail.lapseofthought.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EgxTpTGMlP83 for ; Mon, 7 Sep 2020 18:28:37 -0700 (PDT) Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:e46c:9d19:2a57:9dd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4Blnbm67H5z3jt5k for ; Mon, 7 Sep 2020 18:28:36 -0700 (PDT) From: Alex Bochannek To: bug-gnu-emacs@gnu.org Subject: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age Date: Mon, 07 Sep 2020 18:28:34 -0700 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: softfail client-ip=50.0.39.243; envelope-from=alex@bochannek.com; helo=mail.lapseofthought.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/07 21:29:09 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: 2 X-Spam_score: 0.2 X-Spam_bar: / X-Spam_report: (0.2 / 5.0 requ) BAYES_00=-1.9, FORGED_SPF_HELO=1, KHOP_HELO_FCRDNS=0.399, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.665, TVD_RCVD_IP=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 08 Sep 2020 04:42:29 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain The below patch to Gnus allows for scoring based on article age. For example: (("date" (7 10 nil <) (7 -10 nil >) (14 -10 nil >))) results in articles less than a week old to get a 10 point increase, older than a week a 10 point decrease, and older than two weeks a cumulative 20 point decrease. I am also including a documentation change. I have not made any changes to interactive scoring. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gnus-score.el.diff Content-Description: Enhance gnus-score-date to support scoring by article age (code) *** /Users/awb/Desktop/gnus-score.el.~1~ 2020-07-27 14:21:49.000000000 -0700 --- /Users/awb/Desktop/gnus-score.el 2020-09-07 12:21:36.000000000 -0700 *************** *** 1370,1378 **** (setq err (cond ! ((if (member (downcase type) '("lines" "chars")) ! (not (numberp (car s))) ! (not (stringp (car s)))) (format "Invalid match %s in %s" (car s) file)) ((and (cadr s) (not (integerp (cadr s)))) (format "Non-integer score %s in %s" (cadr s) file)) --- 1370,1381 ---- (setq err (cond ! ((cond ((member (downcase type) '("lines" "chars")) ! (not (numberp (car s)))) ! ((string= (downcase type) "date") ! (not (or (numberp (car s)) ! (stringp (car s))))) ! (t (not (stringp (car s))))) (format "Invalid match %s in %s" (car s) file)) ((and (cadr s) (not (integerp (cadr s)))) (format "Non-integer score %s in %s" (cadr s) file)) *************** *** 1690,1698 **** --- 1693,1711 ---- ((eq type 'after) (setq match-func 'string< match (gnus-date-iso8601 (nth 0 kill)))) + ((eq type '<) + (setq type 'after + match-func 'gnus-string> + match (gnus-time-iso8601 + (time-add (current-time) (* 86400 (nth 0 kill)))))) ((eq type 'before) (setq match-func 'gnus-string> match (gnus-date-iso8601 (nth 0 kill)))) + ((eq type '>) + (setq type 'before + match-func 'gnus-string> + match (gnus-time-iso8601 + (time-add (current-time) (* -86400 (nth 0 kill)))))) ((eq type 'at) (setq match-func 'string= match (gnus-date-iso8601 (nth 0 kill)))) --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=gnus.info.diff Content-Transfer-Encoding: quoted-printable Content-Description: Enhance gnus-score-date to support scoring by article age (info) *** /Users/awb/Desktop/gnus.info.~1~ 2020-08-11 22:15:17.000000000 -0700 --- /Users/awb/Desktop/gnus.info 2020-09-07 18:14:22.000000000 -0700 *************** *** 16155,16160 **** --- 16155,16168 ---- from. Time zones are such wholesome fun for the whole family, eh?) =20=20 + The two additional match types =E2=80=98<=E2=80=99 and =E2= =80=98>=E2=80=99 take an integer + number of days as a match, similar to =E2=80=98lines=E2=80= =99: +=20 + (7 -10 nil >) +=20 + The above reduces the score for articles older than 7 days + at scoring time by 10. +=20 =E2=80=9CHead, Body, All=E2=80=9D These three match keys use the same match types as the =E2=80=98From=E2=80=99 (etc.) header uses. --=-=-= Content-Type: text/plain -- Alex. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 08 05:51:21 2020 Received: (at 43270) by debbugs.gnu.org; 8 Sep 2020 09:51:21 +0000 Received: from localhost ([127.0.0.1]:51984 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFaHY-0006JA-Ue for submit@debbugs.gnu.org; Tue, 08 Sep 2020 05:51:21 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFaHW-0006It-Bv for 43270@debbugs.gnu.org; Tue, 08 Sep 2020 05:51:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=huQ94k6T/50HL32WdIuyJVaF9rpL9BOAVh+VppbHxCQ=; b=aa7BWM5I6Kp05a/vAO+98C5/Iz 4DD6n0UytNdlb4lczgVj45yY/QkOOjwQty955MJ12A0RxLL5S7J6+DjSFveHgMrxm2f79q6QSPFaQ FHTbPRoCnFJZdiX56M3JZOSB4ZTQJ2bFRwzEJFJ3gSoWO4HNnxWd2V/Vc0wmVRpK51IM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFaHM-0001ks-2C; Tue, 08 Sep 2020 11:51:10 +0200 From: Lars Ingebrigtsen To: Alex Bochannek Subject: Re: bug#43270: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age References: X-Now-Playing: Rustin Man's _Drift Code_: "Light The Light" Date: Tue, 08 Sep 2020 11:51:06 +0200 In-Reply-To: (Alex Bochannek's message of "Mon, 07 Sep 2020 18:28:34 -0700") Message-ID: <878sdk7g1h.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alex Bochannek writes: > The below patch to Gnus allows for scoring based on article age. > > For example: > > (("date" > (7 10 nil <) > (7 -10 nil >) > (14 -10 nil >))) > > results in articles less than a week old to get a [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43270 Cc: 43270@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alex Bochannek writes: > The below patch to Gnus allows for scoring based on article age. > > For example: > > (("date" > (7 10 nil <) > (7 -10 nil >) > (14 -10 nil >))) > > results in articles less than a week old to get a 10 point increase, > older than a week a 10 point decrease, and older than two weeks a > cumulative 20 point decrease. Thanks; applied with one change: > *** /Users/awb/Desktop/gnus.info.~1~ 2020-08-11 22:15:17.000000000 -0700 > --- /Users/awb/Desktop/gnus.info 2020-09-07 18:14:22.000000000 -0700 [...] > + The two additional match types =E2=80=98<=E2=80=99 and = =E2=80=98>=E2=80=99 take an integer > + number of days as a match, similar to =E2=80=98lines=E2= =80=99: The .info files are generated files -- the documentation goes into doc/misc/gnus.texi (and I expanded upon the feature somewhat based on your email). The patch is just small enough to go through without a copyright assignment (and I forgot to mark the commit as such; sigh), but for any future patches you might send, we'd need to have the copyright assigned to the FSF. Would you be willing to do that? If so, we could start the ball rolling now on the paperwork, so that any subsequent patches can be applied faster. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 08 05:51:26 2020 Received: (at control) by debbugs.gnu.org; 8 Sep 2020 09:51:26 +0000 Received: from localhost ([127.0.0.1]:51987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFaHe-0006JR-6j for submit@debbugs.gnu.org; Tue, 08 Sep 2020 05:51:26 -0400 Received: from quimby.gnus.org ([95.216.78.240]:39432) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFaHc-0006J3-Cp for control@debbugs.gnu.org; Tue, 08 Sep 2020 05:51:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=J0dBwx3msHrpi3d5yyjp0o4+N4Rz6n6Lk1VIoUgG2Uo=; b=URYqjL6mRsVWvLLY2gnk8RepRW fBb9/VPXcQQl09um1i9r/2/b8XAaWruO0pV6YVifkBZ0itqACTfIaBf5KF/u+h/JBnd/oq/3tjair vvMjqerwK6IfggU10h1H1Wp3LQ7W7b0fXi1EO/eBo2dgRp2Rnmw7GZGnXksINlJY3kLg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFaHU-0001nO-8y for control@debbugs.gnu.org; Tue, 08 Sep 2020 11:51:18 +0200 Date: Tue, 08 Sep 2020 11:51:15 +0200 Message-Id: <877dt47g18.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #43270 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 43270 fixed close 43270 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 43270 fixed close 43270 28.1 quit From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 20:14:49 2020 Received: (at 43270) by debbugs.gnu.org; 10 Sep 2020 00:14:49 +0000 Received: from localhost ([127.0.0.1]:35289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGAEg-0006rg-B6 for submit@debbugs.gnu.org; Wed, 09 Sep 2020 20:14:48 -0400 Received: from 50-0-39-243.dsl.static.fusionbroadband.com ([50.0.39.243]:24032 helo=mail.lapseofthought.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG9zb-0006Fj-Vc for 43270@debbugs.gnu.org; Wed, 09 Sep 2020 19:59:14 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.lapseofthought.com (Postfix) with ESMTP id 4BmzWY4pDmz3jjyr; Wed, 9 Sep 2020 16:59:05 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at lapseofthought.com Received: from mail.lapseofthought.com ([127.0.0.1]) by localhost (mail.lapseofthought.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TTOg1gQlIKKw; Wed, 9 Sep 2020 16:59:04 -0700 (PDT) Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:c09c:9795:a1f:e16e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4BmzWX1bmmz3jjrX; Wed, 9 Sep 2020 16:59:04 -0700 (PDT) From: Alex Bochannek To: Lars Ingebrigtsen Subject: Re: bug#43270: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age References: <878sdk7g1h.fsf@gnus.org> Date: Wed, 09 Sep 2020 16:59:03 -0700 In-Reply-To: <878sdk7g1h.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 08 Sep 2020 11:51:06 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Lars Ingebrigtsen writes: > The .info files are generated files -- the documentation goes into > doc/misc/gnus.texi (and I expanded upon the feature somewhat based on > your email). Thanks for the reminder, forgot about that. Content analysis details: (2.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 TVD_RCVD_IP Message was received from an IP address 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 FORGED_SPF_HELO No description available. 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43270 X-Mailman-Approved-At: Wed, 09 Sep 2020 20:14:45 -0400 Cc: 43270@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > The .info files are generated files -- the documentation goes into > doc/misc/gnus.texi (and I expanded upon the feature somewhat based on > your email). Thanks for the reminder, forgot about that. Looks like I inverted the logic for '<'. New patch attached. > The patch is just small enough to go through without a copyright > assignment (and I forgot to mark the commit as such; sigh), but for any > future patches you might send, we'd need to have the copyright assigned > to the FSF. Would you be willing to do that? If so, we could start the > ball rolling now on the paperwork, so that any subsequent patches can be > applied faster. I believe my employer is already on file, so if there are any more substantial contributions, I can use that. Thanks! -- Alex. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gnus-score.el.diff Content-Description: Fix inverted logic in gnus-score-date when scoring by less-than date diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index c5156a195a..12f733ac13 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -1695,9 +1695,9 @@ gnus-score-date match (gnus-date-iso8601 (nth 0 kill)))) ((eq type '<) (setq type 'after - match-func 'gnus-string> + match-func 'string< match (gnus-time-iso8601 - (time-add (current-time) (* 86400 (nth 0 kill)))))) + (time-subtract (current-time) (* 86400 (nth 0 kill)))))) ((eq type 'before) (setq match-func 'gnus-string> match (gnus-date-iso8601 (nth 0 kill)))) @@ -1705,7 +1705,7 @@ gnus-score-date (setq type 'before match-func 'gnus-string> match (gnus-time-iso8601 - (time-add (current-time) (* -86400 (nth 0 kill)))))) + (time-subtract (current-time) (* 86400 (nth 0 kill)))))) ((eq type 'at) (setq match-func 'string= match (gnus-date-iso8601 (nth 0 kill)))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 10 09:16:35 2020 Received: (at 43270) by debbugs.gnu.org; 10 Sep 2020 13:16:35 +0000 Received: from localhost ([127.0.0.1]:37637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGMRH-0006Zc-GT for submit@debbugs.gnu.org; Thu, 10 Sep 2020 09:16:35 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGMRF-0006ZC-Gs for 43270@debbugs.gnu.org; Thu, 10 Sep 2020 09:16:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4z9cd+lHfPJZgGi+xty2LK741nVO78JV2QNmqC4516s=; b=t5ZXUYtmQWR0ZLJP5Uo9YJgN2+ jx0GaBJuXGzEcBRtbfUf/9NY+qGbg0atnBQw2Qsy598b7RPopS1vZrlsdGJvG8+m4LLtWfR/+jt0y I7G4agkRm4XQ1oRkYpEh2dg0OCgIxtdG3q6j5SnHXsFYE5N6eEEhsQoIT7p91dlclMyE=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGMR4-0006l0-6J; Thu, 10 Sep 2020 15:16:26 +0200 From: Lars Ingebrigtsen To: Alex Bochannek Subject: Re: bug#43270: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age References: <878sdk7g1h.fsf@gnus.org> X-Now-Playing: Various's _Disco Rallado_: "Jason Forrest - Song For My Grandmother" Date: Thu, 10 Sep 2020 15:16:20 +0200 In-Reply-To: (Alex Bochannek's message of "Wed, 09 Sep 2020 16:59:03 -0700") Message-ID: <87een97owr.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alex Bochannek writes: > Looks like I inverted the logic for '<'. New patch attached. Thanks; applied. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43270 Cc: 43270@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alex Bochannek writes: > Looks like I inverted the logic for '<'. New patch attached. Thanks; applied. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 10 20:58:44 2020 Received: (at 43270) by debbugs.gnu.org; 11 Sep 2020 00:58:44 +0000 Received: from localhost ([127.0.0.1]:41769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGXOm-0007xv-7h for submit@debbugs.gnu.org; Thu, 10 Sep 2020 20:58:44 -0400 Received: from 50-0-39-243.dsl.static.fusionbroadband.com ([50.0.39.243]:33541 helo=mail.lapseofthought.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGXOg-0007xc-FQ for 43270@debbugs.gnu.org; Thu, 10 Sep 2020 20:58:42 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.lapseofthought.com (Postfix) with ESMTP id 4Bncnh22X4z3jjWL; Thu, 10 Sep 2020 17:58:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at lapseofthought.com Received: from mail.lapseofthought.com ([127.0.0.1]) by localhost (mail.lapseofthought.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cDsNp128PB-5; Thu, 10 Sep 2020 17:58:31 -0700 (PDT) Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:45d2:a739:aa89:6e4b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4Bncng0SF8z3jhbH; Thu, 10 Sep 2020 17:58:31 -0700 (PDT) From: Alex Bochannek To: Lars Ingebrigtsen Subject: Re: bug#43270: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age References: <878sdk7g1h.fsf@gnus.org> <87een97owr.fsf@gnus.org> Date: Thu, 10 Sep 2020 17:58:30 -0700 In-Reply-To: <87een97owr.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 10 Sep 2020 15:16:20 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Lars Ingebrigtsen writes: > Alex Bochannek writes: > >> Looks like I inverted the logic for '<'. New patch attached. > > Thanks; applied. Thanks, Lars! Below is another small patch to also support article age in interactive scoring. I wasn't sure about the error handling, so feel free to change that if there is a preferred style. Content analysis details: (2.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 TVD_RCVD_IP Message was received from an IP address 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 FORGED_SPF_HELO No description available. 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43270 Cc: 43270@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Alex Bochannek writes: > >> Looks like I inverted the logic for '<'. New patch attached. > > Thanks; applied. Thanks, Lars! Below is another small patch to also support article age in interactive scoring. I wasn't sure about the error handling, so feel free to change that if there is a preferred style. -- Alex. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gnus-score.el.diff Content-Description: Modify gnus-summary-score-entry to support interactive article scoring by age diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 6a0e8ceb99..fce7b68db1 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -862,6 +862,18 @@ gnus-summary-score-entry (setq match (string-to-number match))) (set-text-properties 0 (length match) nil match)) + ;; Modify match and type for article age scoring. + (if (string= "date" (nth 0 (assoc header gnus-header-index))) + (let ((age (string-to-number match))) + (if (or (< age 0) + (string= "0" match)) + (user-error "Article age must be a positive number")) + (setq match age + type (cond ((eq type 'after) + '<) + ((eq type 'before) + '>))))) + (unless (eq date 'now) ;; Add the score entry to the score file. (when (= score gnus-score-interactive-default-score) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 08:17:46 2020 Received: (at 43270) by debbugs.gnu.org; 11 Sep 2020 12:17:46 +0000 Received: from localhost ([127.0.0.1]:42814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGhzt-00062B-Sf for submit@debbugs.gnu.org; Fri, 11 Sep 2020 08:17:46 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGhzn-0005th-Rd for 43270@debbugs.gnu.org; Fri, 11 Sep 2020 08:17:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=V8mDbWmQCBnF4BPhO2mhaSZZ5EthYktwQQuYCosLn8A=; b=MzSDfKnsGsMX90Ro50nR9SSaqW nnc779YXp6UR+uv9WgpXGJP2PbDmVB3NE7qYWfbjI5uH+aAxcU4qoOLkbG70Nt3DEdhhk3O8zOMCx dBI1odgOX6MZqaWWa7wKeZ1MvHdh4iRuv3qv3+SUC/WL2fgB9Bm3peig08z4YbsMqg8c=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGhzc-0001tR-IH; Fri, 11 Sep 2020 14:17:31 +0200 From: Lars Ingebrigtsen To: Alex Bochannek Subject: Re: bug#43270: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age References: <878sdk7g1h.fsf@gnus.org> <87een97owr.fsf@gnus.org> X-Now-Playing: Laraaji & Lyghte's _Celestial Realms_: "Equinox" Date: Fri, 11 Sep 2020 14:17:27 +0200 In-Reply-To: (Alex Bochannek's message of "Thu, 10 Sep 2020 17:58:30 -0700") Message-ID: <874ko4zew8.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alex Bochannek writes: > Thanks, Lars! Below is another small patch to also support article age > in interactive scoring. I wasn't sure about the error handling, so feel > free to change that if there is a preferred style. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43270 Cc: 43270@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alex Bochannek writes: > Thanks, Lars! Below is another small patch to also support article age > in interactive scoring. I wasn't sure about the error handling, so feel > free to change that if there is a preferred style. Looks good -- you said your employer was on file (for the copyright assignment), but you didn't say who your employer was. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 12 02:14:32 2020 Received: (at 43270) by debbugs.gnu.org; 12 Sep 2020 06:14:32 +0000 Received: from localhost ([127.0.0.1]:46018 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGynw-0007z3-7h for submit@debbugs.gnu.org; Sat, 12 Sep 2020 02:14:32 -0400 Received: from 50-0-39-243.dsl.static.fusionbroadband.com ([50.0.39.243]:16549 helo=mail.lapseofthought.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGynr-0007yn-Nr for 43270@debbugs.gnu.org; Sat, 12 Sep 2020 02:14:31 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.lapseofthought.com (Postfix) with ESMTP id 4BpMld48RGz3jh6w; Fri, 11 Sep 2020 23:14:21 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at lapseofthought.com Received: from mail.lapseofthought.com ([127.0.0.1]) by localhost (mail.lapseofthought.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OhYJ0DFM_ZBN; Fri, 11 Sep 2020 23:14:20 -0700 (PDT) Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:95cf:1b46:a99a:8a92]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4BpMlb6Fszz3jhDs; Fri, 11 Sep 2020 23:14:19 -0700 (PDT) From: Alex Bochannek To: Lars Ingebrigtsen Subject: Re: bug#43270: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age References: <878sdk7g1h.fsf@gnus.org> <87een97owr.fsf@gnus.org> <874ko4zew8.fsf@gnus.org> Date: Fri, 11 Sep 2020 23:14:19 -0700 In-Reply-To: <874ko4zew8.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 11 Sep 2020 14:17:27 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.4 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Lars Ingebrigtsen writes: > Alex Bochannek writes: > >> Thanks, Lars! Below is another small patch to also support article age >> in interactive scoring. I wasn't sure about the error handling, so feel >> [...] Content analysis details: (2.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 TVD_RCVD_IP Message was received from an IP address -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.0 FORGED_SPF_HELO No description available. 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 43270 Cc: 43270@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Lars Ingebrigtsen writes: > Alex Bochannek writes: > >> Thanks, Lars! Below is another small patch to also support article age >> in interactive scoring. I wasn't sure about the error handling, so feel >> free to change that if there is a preferred style. > > Looks good -- you said your employer was on file (for the copyright > assignment), but you didn't say who your employer was. :-) Yes, I heard back from the folks in Legal and they confirmed a CLA is in place. I am at Google Thanks! -- Alex. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 12 08:04:40 2020 Received: (at 43270) by debbugs.gnu.org; 12 Sep 2020 12:04:40 +0000 Received: from localhost ([127.0.0.1]:46529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH4Gl-0008Lj-Ur for submit@debbugs.gnu.org; Sat, 12 Sep 2020 08:04:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH4Gk-0008LV-94 for 43270@debbugs.gnu.org; Sat, 12 Sep 2020 08:04:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=3caNYYDMAZNo2OL9qA+UO67Ut8dsscKbcWO2R5N+5Ew=; b=ixxIJ95LoT7B4CHN25kvC+V0vc rhAvUeO3bcdDTZlIsyrb9KhVbueO81e24dMdvV4wMTKKAO5gHIr8mKTzdBbaj4O/EBAfs6646JYq6 DJZtnFhsjuIlYspOGlcnQ7iLsT/XZ3kvnxnNKBW8W2clyUepxbcFcdrxDhEHOSo9uJIc=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kH4GZ-0006BO-VN; Sat, 12 Sep 2020 14:04:30 +0200 From: Lars Ingebrigtsen To: Alex Bochannek Subject: Re: bug#43270: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age References: <878sdk7g1h.fsf@gnus.org> <87een97owr.fsf@gnus.org> <874ko4zew8.fsf@gnus.org> X-Now-Playing: Joni Mitchell's _Clouds_: "The Gallery" Date: Sat, 12 Sep 2020 14:04:26 +0200 In-Reply-To: (Alex Bochannek's message of "Fri, 11 Sep 2020 23:14:19 -0700") Message-ID: <87blib2oc5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alex Bochannek writes: > Lars Ingebrigtsen writes: > >> Alex Bochannek writes: >> >>> Thanks, Lars! Below is another small patch to also support article age >>> in interactive scoring. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 43270 Cc: 43270@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Alex Bochannek writes: > Lars Ingebrigtsen writes: > >> Alex Bochannek writes: >> >>> Thanks, Lars! Below is another small patch to also support article age >>> in interactive scoring. I wasn't sure about the error handling, so feel >>> free to change that if there is a preferred style. >> >> Looks good -- you said your employer was on file (for the copyright >> assignment), but you didn't say who your employer was. :-) > > Yes, I heard back from the folks in Legal and they confirmed a CLA is in > place. I am at Google Thanks for checking; I've now applied your patch to the trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 21 05:15:30 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 11 Oct 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator