* Suggestion for Summary highlighting
@ 2001-05-22 1:44 Nevin Kapur
2001-05-24 13:02 ` Kai Großjohann
0 siblings, 1 reply; 9+ messages in thread
From: Nevin Kapur @ 2001-05-22 1:44 UTC (permalink / raw)
Currently, the highlighting of high/low scored articles in the
*Summary* buffer is controlled by whether their score is higher/lower
than gnus-summary-default-score.
It would be nice if one could instead specify a range, so that if an
article's was greater than the a specified threshold it would be
highlighted as high and if it were lower than a different specified
threshold, it would be highlighted as low, with no highlighting in
between. For example, one could specify the higher threshold as 10 and
lower as -10, in effect introducing a gray region of scores that were
neither high nor low.
Of course this is currently possible by setting gnus-summary-highlight
appropriately. The following patch makes available two variables
gnus-summary-default-high-score and gnus-summary-default-low-score
that implement this functionality. With their default values as 0, the
highlighting proceeds as normal. I don't think will break any existing
code.
I am submitting it for review for inclusion.
Index: lisp/gnus-sum.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-sum.el,v
retrieving revision 6.67
diff -u -r6.67 gnus-sum.el
--- lisp/gnus-sum.el 2001/05/01 17:09:44 6.67
+++ lisp/gnus-sum.el 2001/05/21 01:40:33
@@ -199,6 +199,20 @@
:type '(choice (const :tag "disable")
integer))
+(defcustom gnus-summary-default-high-score 0
+ "*Default threshold for a high scored article.
+An article will be highlighted as high scored if its score is greater
+than this score."
+ :group 'gnus-score-default
+ :type 'integer)
+
+(defcustom gnus-summary-default-low-score 0
+ "*Default threshold for a low scored article.
+An article will be highlighted as low scored if its score is smaller
+than this score."
+ :group 'gnus-score-default
+ :type 'integer)
+
(defcustom gnus-summary-zcore-fuzz 0
"*Fuzziness factor for the zcore in the summary buffer.
Articles with scores closer than this to `gnus-summary-default-score'
@@ -791,33 +805,33 @@
(defcustom gnus-summary-highlight
'(((= mark gnus-canceled-mark)
. gnus-summary-cancelled-face)
- ((and (> score default)
+ ((and (> score default-high)
(or (= mark gnus-dormant-mark)
(= mark gnus-ticked-mark)))
. gnus-summary-high-ticked-face)
- ((and (< score default)
+ ((and (< score default-low)
(or (= mark gnus-dormant-mark)
(= mark gnus-ticked-mark)))
. gnus-summary-low-ticked-face)
((or (= mark gnus-dormant-mark)
(= mark gnus-ticked-mark))
. gnus-summary-normal-ticked-face)
- ((and (> score default) (= mark gnus-ancient-mark))
+ ((and (> score default-high) (= mark gnus-ancient-mark))
. gnus-summary-high-ancient-face)
- ((and (< score default) (= mark gnus-ancient-mark))
+ ((and (< score default-low) (= mark gnus-ancient-mark))
. gnus-summary-low-ancient-face)
((= mark gnus-ancient-mark)
. gnus-summary-normal-ancient-face)
- ((and (> score default) (= mark gnus-unread-mark))
+ ((and (> score default-high) (= mark gnus-unread-mark))
. gnus-summary-high-unread-face)
- ((and (< score default) (= mark gnus-unread-mark))
+ ((and (< score default-low) (= mark gnus-unread-mark))
. gnus-summary-low-unread-face)
((= mark gnus-unread-mark)
. gnus-summary-normal-unread-face)
- ((and (> score default) (memq mark (list gnus-downloadable-mark
+ ((and (> score default-high) (memq mark (list gnus-downloadable-mark
gnus-undownloaded-mark)))
. gnus-summary-high-unread-face)
- ((and (< score default) (memq mark (list gnus-downloadable-mark
+ ((and (< score default-low) (memq mark (list gnus-downloadable-mark
gnus-undownloaded-mark)))
. gnus-summary-low-unread-face)
((and (memq mark (list gnus-downloadable-mark gnus-undownloaded-mark))
@@ -825,9 +839,9 @@
. gnus-summary-normal-unread-face)
((memq mark (list gnus-downloadable-mark gnus-undownloaded-mark))
. gnus-summary-normal-read-face)
- ((> score default)
+ ((> score default-high)
. gnus-summary-high-read-face)
- ((< score default)
+ ((< score default-low)
. gnus-summary-low-read-face)
(t
. gnus-summary-normal-read-face))
@@ -840,10 +854,12 @@
You can use the following variables in the FORM field.
-score: The articles score
-default: The default article score.
-below: The score below which articles are automatically marked as read.
-mark: The articles mark."
+score: The article's score
+default: The default article score.
+default-high: The default score for high scored articles.
+default-low: The default score for low scored articles.
+below: The score below which articles are automatically marked as read.
+mark: The articles mark."
:group 'gnus-summary-visual
:type '(repeat (cons (sexp :tag "Form" nil)
face)))
@@ -9955,7 +9971,9 @@
(mark (or (gnus-summary-article-mark) gnus-unread-mark))
(inhibit-read-only t))
;; Eval the cars of the lists until we find a match.
- (let ((default gnus-summary-default-score))
+ (let ((default gnus-summary-default-score)
+ (default-high gnus-summary-default-high-score)
+ (default-low gnus-summary-default-low-score))
(while (and list
(not (eval (caar list))))
(setq list (cdr list))))
--
Nevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggestion for Summary highlighting
2001-05-22 1:44 Suggestion for Summary highlighting Nevin Kapur
@ 2001-05-24 13:02 ` Kai Großjohann
2001-05-24 14:15 ` Nevin Kapur
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Kai Großjohann @ 2001-05-24 13:02 UTC (permalink / raw)
Cc: ding
On 21 May 2001, Nevin Kapur wrote:
> I am submitting it for review for inclusion.
I have now committed the patch. I'm not quite sure if it's below
the copyright-assignment limit. Hm.
Anyone?
kai
--
~/.signature: No such file or directory
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggestion for Summary highlighting
2001-05-24 13:02 ` Kai Großjohann
@ 2001-05-24 14:15 ` Nevin Kapur
2001-05-24 17:46 ` Colin Walters
2001-05-27 14:10 ` Raja R Harinath
2 siblings, 0 replies; 9+ messages in thread
From: Nevin Kapur @ 2001-05-24 14:15 UTC (permalink / raw)
Cc: ding
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> I have now committed the patch. I'm not quite sure if it's below
> the copyright-assignment limit. Hm.
Thanks. If a copyright assignment is needed, I'd provide it.
--
Nevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggestion for Summary highlighting
2001-05-24 13:02 ` Kai Großjohann
2001-05-24 14:15 ` Nevin Kapur
@ 2001-05-24 17:46 ` Colin Walters
2001-05-24 22:13 ` Kai Großjohann
2001-05-27 14:10 ` Raja R Harinath
2 siblings, 1 reply; 9+ messages in thread
From: Colin Walters @ 2001-05-24 17:46 UTC (permalink / raw)
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> On 21 May 2001, Nevin Kapur wrote:
>
> > I am submitting it for review for inclusion.
>
> I have now committed the patch. I'm not quite sure if it's below
> the copyright-assignment limit. Hm.
>
> Anyone?
I think the limit is about 10-15 lines, and this patch seems to exceed
it. When in doubt, I think it's better to just go ahead and send in
papers now, because you'll likely need them for a future contribution
if not this one, and they take a while to process (about 1 1/2 months
for me, IIRC).
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggestion for Summary highlighting
2001-05-24 17:46 ` Colin Walters
@ 2001-05-24 22:13 ` Kai Großjohann
2001-05-24 22:25 ` Nevin Kapur
0 siblings, 1 reply; 9+ messages in thread
From: Kai Großjohann @ 2001-05-24 22:13 UTC (permalink / raw)
On 24 May 2001, Colin Walters wrote:
> When in doubt, I think it's better to just go ahead and send in
> papers now, because you'll likely need them for a future
> contribution if not this one, and they take a while to process
> (about 1 1/2 months for me, IIRC).
Yes, better be on the safe side. Nevin?
kai
--
~/.signature: No such file or directory
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggestion for Summary highlighting
2001-05-24 22:13 ` Kai Großjohann
@ 2001-05-24 22:25 ` Nevin Kapur
0 siblings, 0 replies; 9+ messages in thread
From: Nevin Kapur @ 2001-05-24 22:25 UTC (permalink / raw)
Cc: Kai Großjohann, ShengHuo ZHU
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> On 24 May 2001, Colin Walters wrote:
>
> > When in doubt, I think it's better to just go ahead and send in
> > papers now, because you'll likely need them for a future
> > contribution if not this one, and they take a while to process
> > (about 1 1/2 months for me, IIRC).
>
> Yes, better be on the safe side. Nevin?
I've sent back the form that you (and ShengHuo sent me). Thanks to
both you.
--
Nevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggestion for Summary highlighting
2001-05-24 13:02 ` Kai Großjohann
2001-05-24 14:15 ` Nevin Kapur
2001-05-24 17:46 ` Colin Walters
@ 2001-05-27 14:10 ` Raja R Harinath
2001-05-27 14:32 ` Nevin Kapur
2001-05-27 20:03 ` Kai Großjohann
2 siblings, 2 replies; 9+ messages in thread
From: Raja R Harinath @ 2001-05-27 14:10 UTC (permalink / raw)
Cc: Nevin Kapur, ding
[-- Attachment #1: Type: text/plain, Size: 436 bytes --]
Hi,
Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
> On 21 May 2001, Nevin Kapur wrote:
>> I am submitting it for review for inclusion.
>
> I have now committed the patch.
The following patch is needed to complete the change.
>From Raja R Harinath <harinath@cs.umn.edu>
* gnus-salt.el (gnus-tree-highlight-node): Bind 'default-high'
and 'default-low' when evaluating gnus-summary-highlight.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix gnus-tree-highlight-node --]
[-- Type: text/x-patch, Size: 740 bytes --]
Index: gnus-salt.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/gnus-salt.el,v
retrieving revision 6.2
diff -u -p -u -p -r6.2 gnus-salt.el
--- gnus-salt.el 2001/01/09 17:03:38 6.2
+++ gnus-salt.el 2001/05/26 14:06:54
@@ -666,6 +666,8 @@ Two predefined functions are available:
(let* ((score (or (cdr (assq article gnus-newsgroup-scored))
gnus-summary-default-score 0))
(default gnus-summary-default-score)
+ (default-high gnus-summary-default-high-score)
+ (default-low gnus-summary-default-low-score)
(mark (or (gnus-summary-article-mark article) gnus-unread-mark)))
;; Eval the cars of the lists until we find a match.
(while (and list
[-- Attachment #3: Type: text/plain, Size: 213 bytes --]
- Hari
--
Raja R Harinath ------------------------------ harinath@cs.umn.edu
"When all else fails, read the instructions." -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing." -- Roy L Ash
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggestion for Summary highlighting
2001-05-27 14:10 ` Raja R Harinath
@ 2001-05-27 14:32 ` Nevin Kapur
2001-05-27 20:03 ` Kai Großjohann
1 sibling, 0 replies; 9+ messages in thread
From: Nevin Kapur @ 2001-05-27 14:32 UTC (permalink / raw)
Cc: Kai Großjohann, ding
Raja R Harinath <harinath@cs.umn.edu> writes:
> The following patch is needed to complete the change.
>
> >From Raja R Harinath <harinath@cs.umn.edu>
>
> * gnus-salt.el (gnus-tree-highlight-node): Bind 'default-high'
> and 'default-low' when evaluating gnus-summary-highlight.
Yep. Looks good to me.
--
Nevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggestion for Summary highlighting
2001-05-27 14:10 ` Raja R Harinath
2001-05-27 14:32 ` Nevin Kapur
@ 2001-05-27 20:03 ` Kai Großjohann
1 sibling, 0 replies; 9+ messages in thread
From: Kai Großjohann @ 2001-05-27 20:03 UTC (permalink / raw)
Cc: Nevin Kapur, ding
On 27 May 2001, Raja R. Harinath wrote:
> The following patch is needed to complete the change.
Thank you. Applied.
kai
--
~/.signature: No such file or directory
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2001-05-27 20:03 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-22 1:44 Suggestion for Summary highlighting Nevin Kapur
2001-05-24 13:02 ` Kai Großjohann
2001-05-24 14:15 ` Nevin Kapur
2001-05-24 17:46 ` Colin Walters
2001-05-24 22:13 ` Kai Großjohann
2001-05-24 22:25 ` Nevin Kapur
2001-05-27 14:10 ` Raja R Harinath
2001-05-27 14:32 ` Nevin Kapur
2001-05-27 20:03 ` Kai Großjohann
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).