Gnus development mailing list
 help / color / mirror / Atom feed
From: Bill White <billw@wolfram.com>
Cc: ding@gnus.org
Subject: Re: The old high low face gambit
Date: Sun, 09 Dec 2001 16:45:10 -0600	[thread overview]
Message-ID: <m38zccrp1l.fsf@wolfram.com> (raw)
In-Reply-To: <m1y9kchj82.fsf@reader.newsguy.com> (Harry Putnam's message of "Sun, 09 Dec 2001 00:48:45 -0800")

On the Second Sunday of Advent, 2001, at 02:48, Harry Putnam <reader@newsguy.com> said:

>> On the Memorial of Saint Ambrose, 2001, at 14:23, Harry Putnam <reader@newsguy.com> 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 <ruo8zemj59i.fsf@g.wolfram.com> and
<url:http://www.gnus.org/list-archives/ding/200109/msg00530.html>.

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."



      reply	other threads:[~2001-12-09 22:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-07 20:23 Harry Putnam
2001-12-09  0:00 ` Bill White
2001-12-09  8:48   ` Harry Putnam
2001-12-09 22:45     ` Bill White [this message]

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=m38zccrp1l.fsf@wolfram.com \
    --to=billw@wolfram.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).