Keep track of own postings using Summary Highlighting (Submitted by dzimmerm on Sun, 12/28/2003 - 18...

Gnus中使用高亮跟踪帖子
本文介绍如何在Gnus新闻阅读器中利用自定义高亮显示功能来区分自己的帖子及其直接和间接回复。通过设置不同的背景颜色,用户可以轻松地从众多文章中识别出自己的帖子和相关回复。

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 is
your.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 adjust
gnus-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.

转载于:https://www.cnblogs.com/sirsunny/archive/2005/01/19/94265.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值