Gnus development mailing list
 help / color / mirror / Atom feed
* new feature request: highlights on scoring matches
@ 2003-01-21 14:48 Wes Hardaker
  2003-01-21 23:03 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Wes Hardaker @ 2003-01-21 14:48 UTC (permalink / raw)



I was just glancing through a summary buffer where I have various
scoring rules set up.  To complicate matters, of course, is that I
have adaptive scoring turned on as well.

What I realized I'd like is to quickly see why the given line is near
the top.  So, wouldn't it be cool to highlight the matching regex
in the summary buffer with, say, a different background color?  How
hard would it be to pull this off?  (unfortunately, I think this is
likely over the head of my internal-gnus-knowledge so I doubt I'll do
it.  Thus I offer it as an idea for someone else to pull it off). 

The problem, of course, is that you don't want to do it for adaptive
scoring.  This may mean pain.

-- 
"The trouble with having an open mind, of course, is that people will
 insist on coming along and trying to put things in it."   -- Terry Pratchett



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new feature request: highlights on scoring matches
  2003-01-21 14:48 new feature request: highlights on scoring matches Wes Hardaker
@ 2003-01-21 23:03 ` Lars Magne Ingebrigtsen
  2003-01-21 23:17   ` Andreas Fuchs
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-21 23:03 UTC (permalink / raw)


Wes Hardaker <wes@hardakers.net> writes:

> What I realized I'd like is to quickly see why the given line is near
> the top.  So, wouldn't it be cool to highlight the matching regex
> in the summary buffer with, say, a different background color?

That would be cool.  I think.  However, I only score on the From
header, basically.  I don't know how common that is or not...

> How hard would it be to pull this off?

Not fantastically difficult.  `gnus-score-string' would basically
have to maintain an alist of article number/string matches, and then
that would be used to post-process the summary lines.

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new feature request: highlights on scoring matches
  2003-01-21 23:03 ` Lars Magne Ingebrigtsen
@ 2003-01-21 23:17   ` Andreas Fuchs
  2003-01-22  0:26   ` Wes Hardaker
  2003-01-22  0:28   ` Wes Hardaker
  2 siblings, 0 replies; 10+ messages in thread
From: Andreas Fuchs @ 2003-01-21 23:17 UTC (permalink / raw)


Today, Lars Magne Ingebrigtsen <larsi@gnus.org> wrote:
>> How hard would it be to pull this off?
> 
> Not fantastically difficult.  `gnus-score-string' would basically
> have to maintain an alist of article number/string matches, and then
> that would be used to post-process the summary lines.

Hm, there is a format spec for the total score of an article. If you
want to mung the summary line, you could include it in the summary line
format and remove it + text-propertize the matching lines.

It's a hack, but it should do what it should.
-- 
Andreas Fuchs, <asf@acm.org>, asf@jabber.at, antifuchs




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new feature request: highlights on scoring matches
  2003-01-21 23:03 ` Lars Magne Ingebrigtsen
  2003-01-21 23:17   ` Andreas Fuchs
@ 2003-01-22  0:26   ` Wes Hardaker
  2003-01-22  0:28   ` Wes Hardaker
  2 siblings, 0 replies; 10+ messages in thread
From: Wes Hardaker @ 2003-01-22  0:26 UTC (permalink / raw)


>>>>> On Wed, 22 Jan 2003 00:03:12 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

Lars> That would be cool.  I think.  However, I only score on the From
Lars> header, basically.  I don't know how common that is or not...

I suspect a lot of people search on subject too.  I use subject
searching for announcement type lists.  Say, for example, doing
searching for the word "gnus" in comp.sources.emacs.

-- 
"The trouble with having an open mind, of course, is that people will
 insist on coming along and trying to put things in it."   -- Terry Pratchett



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new feature request: highlights on scoring matches
  2003-01-21 23:03 ` Lars Magne Ingebrigtsen
  2003-01-21 23:17   ` Andreas Fuchs
  2003-01-22  0:26   ` Wes Hardaker
@ 2003-01-22  0:28   ` Wes Hardaker
  2003-01-24 21:20     ` Lars Magne Ingebrigtsen
  2 siblings, 1 reply; 10+ messages in thread
From: Wes Hardaker @ 2003-01-22  0:28 UTC (permalink / raw)


>>>>> On Wed, 22 Jan 2003 00:03:12 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

Lars> However, I only score on the From header, basically.

You could highlight the from part of the summary line as well ;-).  

Actually, I think eudora has the ability to color-code stuff based on
expression.  That might be a easier way to pull it off.  Don't make it
tied to scoring at all but make a general "highlight" set of
expressions and face changes.  Then, the scoring regexps could be
added to the more generic highlighting set if desired as well.

-- 
"The trouble with having an open mind, of course, is that people will
 insist on coming along and trying to put things in it."   -- Terry Pratchett



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new feature request: highlights on scoring matches
  2003-01-22  0:28   ` Wes Hardaker
@ 2003-01-24 21:20     ` Lars Magne Ingebrigtsen
  2003-01-27 15:54       ` Wes Hardaker
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-01-24 21:20 UTC (permalink / raw)


Wes Hardaker <wes@hardakers.net> writes:

> Actually, I think eudora has the ability to color-code stuff based on
> expression.  That might be a easier way to pull it off.  Don't make it
> tied to scoring at all but make a general "highlight" set of
> expressions and face changes.  Then, the scoring regexps could be
> added to the more generic highlighting set if desired as well.

Hm...  These expressions would do nothing but highlight regions in
the summary buffer?  Yes, and then the scoring code could add more of
these matches to the mechanism, like you say.  Yes, that sounds a lot
cleaner than hacking up something in the scoring code itself.

Anyone want to take a whack at doing functionality for highlighting
regexps in the summary buffer?  It would probably make sense to do
this after the lines have been generated.

On the other hand, if the score rule is, say "^hello" on Subject,
just adding that to a list of highlighting regexps and running it
over the buffer won't match anything.  And there'll be misleading
matches between, say, Subject and From as displayed.

No, perhaps it isn't as simple as that.  The highlighting would have
to be applied before the strings are entered into the buffer.  That
could be done by transforming a copy of the header structure before
it is inserted into the buffer...

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new feature request: highlights on scoring matches
  2003-01-24 21:20     ` Lars Magne Ingebrigtsen
@ 2003-01-27 15:54       ` Wes Hardaker
  2003-02-01 16:17         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Wes Hardaker @ 2003-01-27 15:54 UTC (permalink / raw)


>>>>> On Fri, 24 Jan 2003 22:20:14 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

Lars> Hm...  These expressions would do nothing but highlight regions
Lars> in the summary buffer?  Yes, and then the scoring code could add
Lars> more of these matches to the mechanism, like you say.  Yes, that
Lars> sounds a lot cleaner than hacking up something in the scoring
Lars> code itself.

That's what I thought.

Lars> On the other hand, if the score rule is, say "^hello" on
Lars> Subject, just adding that to a list of highlighting regexps and
Lars> running it over the buffer won't match anything.  And there'll
Lars> be misleading matches between, say, Subject and From as
Lars> displayed.

Err, good point.

Lars> No, perhaps it isn't as simple as that.  The highlighting would
Lars> have to be applied before the strings are entered into the
Lars> buffer.  That could be done by transforming a copy of the header
Lars> structure before it is inserted into the buffer...

Well, just having a basic-infrastructure for highlighting I think is
the first correct step.  If nothing else, people can hind-rewrite
their expressions for scoring for highlighting use.

I wonder if there are any tricky cases other than ^ and $.  I'd have
to think about it, because otherwise those could be easily replaced.
err, no they couldn't as the summary line format is different for
every person.  arg.

-- 
"The trouble with having an open mind, of course, is that people will
 insist on coming along and trying to put things in it."   -- Terry Pratchett



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new feature request: highlights on scoring matches
  2003-01-27 15:54       ` Wes Hardaker
@ 2003-02-01 16:17         ` Lars Magne Ingebrigtsen
  2003-02-04 17:05           ` Wes Hardaker
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-02-01 16:17 UTC (permalink / raw)


Wes Hardaker <wes@hardakers.net> writes:

> I wonder if there are any tricky cases other than ^ and $.  I'd have
> to think about it, because otherwise those could be easily replaced.
> err, no they couldn't as the summary line format is different for
> every person.  arg.

Yup.  But if we were to make the highlighting mechanism work on
header values (from, subject, etc) instead of the summary line, then
that should be no problem.  Apply the highlighting to the values as
text props before they are inserted in the buffer...

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new feature request: highlights on scoring matches
  2003-02-01 16:17         ` Lars Magne Ingebrigtsen
@ 2003-02-04 17:05           ` Wes Hardaker
  2003-02-07 12:33             ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Wes Hardaker @ 2003-02-04 17:05 UTC (permalink / raw)


>>>>> On Sat, 01 Feb 2003 17:17:29 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

Lars> Yup.  But if we were to make the highlighting mechanism work on
Lars> header values (from, subject, etc) instead of the summary line,
Lars> then that should be no problem.  Apply the highlighting to the
Lars> values as text props before they are inserted in the buffer...

You know, programs like Eudora does regex matching on the entire
message to color code the summary-line-equivalent.  But they highlight
the entire line and can't do partial highlighting.

In other words, wouldn't it by ideal to highlight the From: portion of
the summary buffer if the headers contained something like "Priority:
high", for example.

I like adding complexity.  Really.

-- 
"In the bathtub of history the truth is harder to hold than the soap,
 and much more difficult to find."  -- Terry Pratchett



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: new feature request: highlights on scoring matches
  2003-02-04 17:05           ` Wes Hardaker
@ 2003-02-07 12:33             ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-02-07 12:33 UTC (permalink / raw)


Wes Hardaker <wes@hardakers.net> writes:

> In other words, wouldn't it by ideal to highlight the From: portion of
> the summary buffer if the headers contained something like "Priority:
> high", for example.

It certainly would make sense to mark the message as spam if there
was a "Priority: high" header in the message.  :-)

> I like adding complexity.  Really.

But, yes, it might make sense to highlight X if Y somewhere else, but
I don't really think that it would be all that useful.  I think what
I would like to see are the actual terms matched in some way or other
(when it comes to scoring).

-- 
(domestic pets only, the antidote for overdose, milk.)
   larsi@gnus.org * Lars Magne Ingebrigtsen



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-02-07 12:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-21 14:48 new feature request: highlights on scoring matches Wes Hardaker
2003-01-21 23:03 ` Lars Magne Ingebrigtsen
2003-01-21 23:17   ` Andreas Fuchs
2003-01-22  0:26   ` Wes Hardaker
2003-01-22  0:28   ` Wes Hardaker
2003-01-24 21:20     ` Lars Magne Ingebrigtsen
2003-01-27 15:54       ` Wes Hardaker
2003-02-01 16:17         ` Lars Magne Ingebrigtsen
2003-02-04 17:05           ` Wes Hardaker
2003-02-07 12:33             ` Lars Magne Ingebrigtsen

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