Gnus development mailing list
 help / color / mirror / Atom feed
From: Rupert Swarbrick <rswarbrick@googlemail.com>
To: ding@gnus.org
Subject: Score traces
Date: Tue, 01 Jul 2008 10:05:09 +0100	[thread overview]
Message-ID: <87k5g6geka.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]


I've been using gnus for a few months now and, though I really like
almost everything about it, I would really like it if the score trace
finished with a "total score" line.

I did the changes below to gnus-score.el and the result looks like

###
("Mario Donick <mario.donick@gmail.com>" 5 733224 s) [rec.games.roguelike.misc.ADAPT] -> ~/News/rec.games.roguelike.misc.ADAPT
("lambdarogue" -10 733224 w) [rec.games.roguelike.misc.ADAPT] -> ~/News/rec.games.roguelike.misc.ADAPT
Total score: -5

Quick help:

Type `e' to edit score file corresponding to the score rule on current line,
`f' to format (pretty print) the score file and edit it,
`t' toggle to truncate long lines in this buffer,
`q' to quit, `k' to kill score trace buffer.

The first sexp on each line is the score rule, followed by the file name of
###

I think this is handy when there are gazillions of scoring reasons - my
mental arithmetic starts to get outclassed at about 5...

Does this seem a useful patch? Is there a better way to do it?

Rupert



*** gnus-score.el	19 May 2008 09:47:42 +0100	7.39
--- gnus-score.el	01 Jul 2008 09:40:11 +0100	
***************
*** 2467,2472 ****
--- 2467,2475 ----
  		   ;; .ADAPT directly:
  		   (file-name-nondirectory file)
  		   (abbreviate-file-name file))))
+         (insert
+          (format "Total score: %d"
+                  (apply '+ (mapcar 'caddr trace))))
  	(insert
  	 "\n\nQuick help:
  

[-- Attachment #2: Type: application/pgp-signature, Size: 314 bytes --]

             reply	other threads:[~2008-07-01  9:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01  9:05 Rupert Swarbrick [this message]
2008-07-01 20:16 ` Reiner Steib

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k5g6geka.fsf@gmail.com \
    --to=rswarbrick@googlemail.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).