How to use Summary Highlighting to keep track of own postings an followups to it.
Did you ever wish that your postings and followups to them would
be displayed with another face? Hey, this is Gnus, so let's do
this!
In this example, we will use three faces: one for your own
postings, one for direct followups to them and one for indirect
followups (followups to followups to them).
Making the faces
First, we have to define the faces. This takes the basic face
information from gnus-summary-high-unread-face
and
adjusts the background.
(require 'gnus-sum)
(defface dz-gnus-own-posting-face nil
"Use this face to display own postings in Summary Buffer")
(copy-face 'gnus-summary-high-unread-face 'dz-gnus-own-posting-face)
(set-face-background 'dz-gnus-own-posting-face "aquamarine")(defface dz-gnus-direct-fup-face nil
"Use this face to display direct fups to my postings.")
(copy-face 'gnus-summary-high-unread-face 'dz-gnus-direct-fup-face)
(set-face-background 'dz-gnus-direct-fup-face "yellow")(defface dz-gnus-indirect-fup-face nil
"Use this face to display indirect fups to my postings")
(copy-face 'gnus-summary-high-unread-face 'dz-gnus-indirect-fup-face)
(set-face-background 'dz-gnus-indirect-fup-face "lightgreen")
Scoring the articles
To do the scoring, you have to use Message-IDs with an unique
domain part. Let's say your domain part isyour.domain.here
, put this in your all.SCORE:
(
("message-id"
("@your.domain.here>" +9000 nil s))
("references"
("@your\\.domain\\.here>$" +8000 nil r)
("@your\\.domain\\.here>.+@" +7000 nil r)
("@your\\.domain\\.here>.+@your\\.domain\\.here>$" -7000 nil r))
((&
("message-id" "@your.domain.here>" s)
("references" "@your.domain.here>" s))
-7000 nil))
Your own postings get a score of +9000, followups to it +8000
and indirect followups +7000.
Telling Gnus to use the faces
To make Gnus use the faces, we have to adjustgnus-summary-highlight
:
(add-to-list 'gnus-summary-highlight
'((and (> score 8500) (eq mark gnus-unread-mark)) . dz-gnus-own-posting-face))(add-to-list 'gnus-summary-highlight
'((and (>= 8500 score) (>= score 7500) (eq mark gnus-unread-mark)) . dz-gnus-direct-fup-face))(add-to-list 'gnus-summary-highlight
'((and (>= 7499 score) (>= score 6500) (eq mark gnus-unread-mark)) . dz-gnus-indirect-fup-face))
That's it!
Known problems
Maybe this does not work if the postings are scored by other
score file entries which raises or lowers score with more than 499.
If you used to work with `L' or `I', you
should set gnus-score-interactive-default-score
to a
value lower than 499.
(setq gnus-score-interactive-default-score 400)
Adaptive Scores should not get in these high regions, so don't
mind.