From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65142 Path: news.gmane.org!not-for-mail From: asjo@koldfront.dk (Adam =?iso-8859-1?Q?Sj=F8gren?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-summary-sort-by-X-Spam-Status Date: Wed, 05 Sep 2007 12:43:29 +0200 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87642p1jfy.fsf@topper.koldfront.dk> References: <87fy1ux9oi.fsf@jidanni.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1189004842 10573 80.91.229.12 (5 Sep 2007 15:07:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Sep 2007 15:07:22 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M13655@lists.math.uh.edu Wed Sep 05 17:07:22 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1ISwTH-0001VU-CH for ding-account@gmane.org; Wed, 05 Sep 2007 17:07:11 +0200 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 1ISwST-0001fl-65; Wed, 05 Sep 2007 10:06:21 -0500 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 1ISsMM-0000Sx-Ll for ding@lists.math.uh.edu; Wed, 05 Sep 2007 05:43:46 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1ISsMJ-0006BZ-8V for ding@lists.math.uh.edu; Wed, 05 Sep 2007 05:43:46 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1ISsMI-0007Uj-00 for ; Wed, 05 Sep 2007 12:43:42 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ISsMG-0006FM-Gn for ding@gnus.org; Wed, 05 Sep 2007 12:43:40 +0200 Original-Received: from finn.gmane.org ([80.91.229.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Sep 2007 12:43:40 +0200 Original-Received: from asjo by finn.gmane.org with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 05 Sep 2007 12:43:40 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: finn.gmane.org X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97,Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:65142 Archived-At: On Wed, 05 Sep 2007 08:01:01 +0800, jidanni@jidanni.org wrote: > Gentlemen, I see there is no gnus-summary-sort-by-my-favorite-header > capability. You can define your own sort functions, though. > I want to sort by "X-Spam-Status: Yes, score=23.3" lines. I've got this function in my .gnus: ; Sort by X-Spam-Status: ; (by Michael Shields in <87brssb9cg.fsf@mulligatwani.msrl.com> ;; Set gnus-extra-headers instead^WALSO: ;; SpamAssasin 3.0.0 changed "hits" to "score": (add-to-list 'nnmail-extra-headers 'X-Spam-Status) (defun gnus-article-sort-by-spam-status (h1 h2) "Sort articles by score from the X-Spam-Status: header." (< (string-to-number (gnus-replace-in-string (gnus-extra-header 'X-Spam-Status h1) ".*score=" "")) (string-to-number (gnus-replace-in-string (gnus-extra-header 'X-Spam-Status h2) ".*score=" "")))) and in the group-parameters for my spam-group, I have added: (gnus-extra-headers '(X-Spam-Status To Newsgroups)) (gnus-article-sort-functions '(gnus-article-sort-by-spam-status))) (I am using nnml for my email, which may or may not be of importance). Ha, I just realized I stopped using SpamAssassin years ago, so the above is a waste of time in my setup. Best regards, -- "I hope you're not going to ask me to explain a Adam Sjøgren title." asjo@koldfront.dk