Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Understanding score syntax
@ 2005-12-11  3:39 currentlyeddie
  2005-12-12 17:19 ` David Z Maze
  0 siblings, 1 reply; 2+ messages in thread
From: currentlyeddie @ 2005-12-11  3:39 UTC (permalink / raw)


> From the manual:

("xref"
  ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
   -1000 nil r)))

What, exactly is going on here? I'm especially fuzzy on the 0-9 bits. I
put this in all.SCORE, and it began lowering scores on messages posted
to a favorite newsgroup that don't seem to be crossposted.
-- 
Currently Eddie!
http://www.livejournal.com/users/dedwardsauve/
http://fwrestling.com/host/uewfederation/
http://www.livejournal.com/users/uewfederation/
But I always thought Racer-X was cooler...


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

* Re: Understanding score syntax
  2005-12-11  3:39 Understanding score syntax currentlyeddie
@ 2005-12-12 17:19 ` David Z Maze
  0 siblings, 0 replies; 2+ messages in thread
From: David Z Maze @ 2005-12-12 17:19 UTC (permalink / raw)


currentlyeddie@rogers.com writes:

> From the manual:
>
> ("xref"
>   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
>    -1000 nil r)))
>
> What, exactly is going on here? I'm especially fuzzy on the 0-9 bits. I
> put this in all.SCORE, and it began lowering scores on messages posted
> to a favorite newsgroup that don't seem to be crossposted.

It's fundamentally a regular expression, and regexps are used in lots
of parts of Emacs and Un*x in general (and perl and python and sed and
...), so they're definitely useful to lear about.  Dissecting it:

[^:\n]+            At least one of any character except colon or newline
:                  A colon
[0-9]+             At least one digit
 +                 At least one space
[^:\n]+:[0-9]+ +   Similarly
[^:\n]+:[0-9]+     Similarly

So it matches headers with values like

gnu.emacs.gnus:1234 alt.fan.lars-magne-ingebrigtsen:567 comp.editors.xemacs:17

That is, with at least three clauses in the Xref: header.

  --dzm


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

end of thread, other threads:[~2005-12-12 17:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-11  3:39 Understanding score syntax currentlyeddie
2005-12-12 17:19 ` David Z Maze

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