From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/40799 Path: main.gmane.org!not-for-mail From: Bill White Newsgroups: gmane.emacs.gnus.general Subject: Re: The old high low face gambit Date: Sun, 09 Dec 2001 16:45:10 -0600 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035176295 2832 80.91.224.250 (21 Oct 2002 04:58:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:58:15 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: (qmail 7851 invoked from network); 9 Dec 2001 22:38:57 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 9 Dec 2001 22:38:57 -0000 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 16DCam-0005Cu-00; Sun, 09 Dec 2001 16:38:40 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 09 Dec 2001 16:38:28 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id QAA25326 for ; Sun, 9 Dec 2001 16:38:15 -0600 (CST) Original-Received: (qmail 7811 invoked by alias); 9 Dec 2001 22:38:21 -0000 Original-Received: (qmail 7805 invoked from network); 9 Dec 2001 22:38:19 -0000 Original-Received: from wri-dns0.wolfram.com (HELO wolfram.com) (140.177.205.10) by gnus.org with SMTP; 9 Dec 2001 22:38:19 -0000 Original-Received: from localhost.localdomain (term65.wolfram.com [140.177.117.36]) by wolfram.com (8.11.2/8.11.2) with ESMTP id fB9McF516337; Sun, 9 Dec 2001 16:38:15 -0600 Original-Received: (from billw@localhost) by localhost.localdomain (8.9.3/8.9.3) id QAA01679; Sun, 9 Dec 2001 16:45:11 -0600 X-Authentication-Warning: localhost.localdomain: billw set sender to billw@wolfram.com using -f Original-To: Harry Putnam X-Face: #t7>yWrgv~u6*cn3(6X"z={I/l%nH{(W:#WS-kA|s(Kcu`,=9qGWth&; @\^1U5s"'~/hhBr)ZU0<$?W:C33QJ}$t)m`&?8POaq*>5@/7xEPo!>gb;9Z[x)n%:yE#{A)6rNV_Ow ;vCO&LS=@3c=j'6@^T#Mic6zfW|Ehj0~2;jG9Df+DK'h`bTj>XsArg2CH`jW whq]J?SsvWnqa,{.C\,j]u*L:z6/2am5n5Q~6vC0fKPAMa7?Y6:eC.ThbVX X-Liturgical-Date: Sunday: Second Sunday of Advent In-Reply-To: (Harry Putnam's message of "Sun, 09 Dec 2001 00:48:45 -0800") Original-Lines: 114 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i586-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:40799 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:40799 On the Second Sunday of Advent, 2001, at 02:48, Harry Putnam said: >> On the Memorial of Saint Ambrose, 2001, at 14:23, Harry Putnam said: >> >>> How can I get finer granularity than just `high' face and `low' >>> face on the basis of scoring? [...] >> I tried this for a while but couldn't get a meaningful *and* >> pleasing *and* easy-to-read combination of colors. After a while >> it just bugged me and I wound up ditching scoring altogether. At >> any rate, here's the code I used: > > Thanks bill, looks like what I was after. > > [...] > Probably just my lack of lisp knowledgw but what about faces 50 thru > 75? I posted the last iteration of my code. I had tried those other faces in the grand coloring scheme, but they had no meaning when they appeared by themselves with no slightly lighter or darker faces to compare them to, so fewer faces worked better in my setup. > Where do they come in? I probably used to do something with a higher resolution like this: ((and (<= score 120) (> score 100)) . my-gnus-face-60) ((and (<= score 140) (> score 120)) . my-gnus-face-65) ((and (<= score 160) (> score 140)) . my-gnus-face-70) etc. > And what, in general does the rest of it do? The lines at the top that deal with scoring are just my additions to the default value of gnus-summary-highlight. Since then, Daniel Pittman showed me a better way to add conditions to g-s-h, and what is probably a better way to define faces. >> (setq gnus-summary-highlight >> '( >> ((and (<= score 100) (> score 0)) . my-gnus-face-80) >> ((and (<= score 200) (> score 100)) . my-gnus-face-85) >> ((and (<= score 300) (> score 200)) . my-gnus-face-90) >> ((and (<= score 400) (> score 300)) . my-gnus-face-95) >> ((> score 400) . my-gnus-face-100) >> ((= mark gnus-canceled-mark) ,----[ ~/.gnus ] | (defface gnus-summary-process-face | '((((class color)) | (:foreground "deeppink" :background "black"))) | "Face used for process-marked articles.") | | (require 'gnus-sum) | (require 'cl) | (pushnew '((memq (gnus-summary-article-number) | gnus-newsgroup-processable) | . gnus-summary-process-face) | gnus-summary-highlight) `---- That "pushnew" thingie will add code to the beginning of g-s-h, just like I did by hand. See message and . Something like this should work (untested): ,---- | (require 'gnus-sum) | (require 'cl) | (pushnew '((> score 400) . my-gnus-face-100) gnus-summary-highlight) | (pushnew '((and (<= score 400) (> score 300)) . my-gnus-face-95) gnus-summary-highlight) | (pushnew '((and (<= score 300) (> score 200)) . my-gnus-face-90) gnus-summary-highlight) | (pushnew '((and (<= score 200) (> score 100)) . my-gnus-face-85) gnus-summary-highlight) | (pushnew '((and (<= score 100) (> score 0)) . my-gnus-face-80) gnus-summary-highlight) `---- > I guess a blow by blow thing is out of the question but it looks > like some kind of trick stuff is happening with lots of existing > variables like ancient face, default face etc. Can I just ignore > all that? I'm thinking along the line of maybe 3-4 special scoring > faces. Did the stuff above answer these questions? > I'm thinking like adding a line with procmail, since I use procmail > anyway, to certain messages like: X-Score: 5 > > I'm thinking procmail because the reason for adding a scoring line > may change frequently and procmail lends itself to being chaned > quickly from the command line. I can imaging scripting that would > quickly insert a rule to add X-Score: 10 to replies to a certain > message for example. > > Then having scoring set up to find the 10 or whatever and set a >face. Similar for other higher/lower faces. That sounds like a sensible kind of scoring. > It would be one way to have followup scoring without invoking the > dreaded `adaptive' score files. Amen. I came to hate adaptive scoring. Cheers - bw -- Bill White . billw@wolfram.com . http://members.wri.com/billw "No ma'am, we're musicians."