Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* simple "advanced" score file is apparently ignored (and Gnus
@ 2012-09-29 17:33 Fritz Wuehler
  2012-09-29 20:22 ` Adam Sjøgren
       [not found] ` <mailman.9989.1348950156.855.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: Fritz Wuehler @ 2012-09-29 17:33 UTC (permalink / raw)
  To: info-gnus-english

After reading the manual and a few other guides, I cannot manage to
get the most simplest score file to work.

I put this text:

((
  ("subject" "my-keyword" nil nil s)
)1000)

in ~/News/all.SCORE.  I expect any article containing "my-keyword" in
any newsgroup to be highlighted.  Yet it does not.  The *messages*
buffer has no indication that ~/News/all.SCORE was read at all.

The manual has a few contradictions and ambiguities, so I tried
several variants of the above.  E.g.

(
 ((
  ("subject" "my-keyword")
)1000)
)

and:

(
 ((
  ("subject" "my-keyword" 9999 nil s)
))
)

and:

((
  ("subject" "my-keyword" 9999 nil s)
))

One part of the manual indicates that there are 2 paranthesis:

  https://www.gnu.org/software/emacs/manual/html_node/gnus/Score-File-Format.html#Score-File-Format

But then it refers to a section that states there must be 3 paranthesis:

  https://www.gnu.org/software/emacs/manual/html_node/gnus/Advanced-Scoring-Examples.html#Advanced-Scoring-Examples

There also seems to be multiple places to put the score.

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

* Re: simple "advanced" score file is apparently ignored (and Gnus
  2012-09-29 17:33 simple "advanced" score file is apparently ignored (and Gnus Fritz Wuehler
@ 2012-09-29 20:22 ` Adam Sjøgren
       [not found] ` <mailman.9989.1348950156.855.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: Adam Sjøgren @ 2012-09-29 20:22 UTC (permalink / raw)
  To: info-gnus-english

On Sat, 29 Sep 2012 19:33:10 +0200, Fritz wrote:

> The manual has a few contradictions and ambiguities, so I tried
> several variants of the above.  E.g.

The structure of my ~/News/all.SCORE looks like this:

   (
    ("from"
     ("Adam Sjøgren" nil nil s)
     ("Dontcarefor" -5000 nil e)
     ("Dontwanttosee" -10000 nil e)
    )
   )

So I would think you could get the desired effect by using:

   (
    ("subject"
     ("my-keyword" nil nil s)
    )
   )

I just tested it, and it worked for me.

You can cause the global score file to be reloaded by using W f in the
*Group* buffer.

(I've never tried anything in the Advanced category.)


  Best regards,

    Adam

-- 
 "Hur långt man än har kommit                                 Adam Sjøgren
  Är det alltid längre kvar"                             asjo@koldfront.dk

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

* Re: Re: simple "advanced" score file is apparently ignored (and Gnus
       [not found] ` <mailman.9989.1348950156.855.info-gnus-english@gnu.org>
@ 2012-10-09  9:15   ` Anonymous
  0 siblings, 0 replies; 3+ messages in thread
From: Anonymous @ 2012-10-09  9:15 UTC (permalink / raw)
  To: info-gnus-english

>The structure of my ~/News/all.SCORE looks like this:

Thanks.

>You can cause the global score file to be reloaded by using W f in the
>*Group* buffer.

Very useful.  I've been restarting repeatedly as I build the score
file.. this will save me some time.

>(I've never tried anything in the Advanced category.)

My end game is to mirror the slrn score file, which is quite powerful.
This forced me down the path of the advanced format in Gnus.  It was
quite confusing at first because there's a temptation to combine
constructs and features from the advanced rules and the simple rules,
which turns out to be impossible.  It turns out the scores cannot be
influenced in each match criteria and also the whole rule -- it's one
or the other.  E.g., this does *not* work:

  ((& 
    ("xref"    "some-group" 50 nil s)
    ("subject" "some-topic" 20 nil s))
   200)

The other major stumbling block to understanding the scoring is that
the simple rule format has an extra set of a paranthesis to group the
match type with the match string.  E.g., this:

    ("subject" ("some-topic" 20 nil s))
 vs.
    ("subject" "some-topic" s)

It took me hours to discover that inconsistency (amid other
differences between the two formats).  Was painful.

In the end, the Gnus score file is certainly less readable than slrn
with a very unforgiving parser, but it seems to have the same
capability.

So I finally got something working.  If anyone wants to see a complete
example of an advanced score file, I have pasted one below because the
manual does not have one, and web searches come up dry on this.

In this example, the first rule gives a high score to articles
appearing in newsgroups with "android" or "mobile" in the name, and
with a subject matter being multi-sim phones, or a Galaxy S Duo in
particular.

The second rule is designed to give a high score to airports of
interest in the
nntp+news.gmane.org:gwene.com.flyertalk.mileage-run.deals newsgroup.

(
 ((& 
   (|
    ("xref" "droid"  S)
    ("xref" "mobile" s))
   (|
    (&
     ("subject" "sim")
     (|
      ("subject" "dual")
      ("subject" "triple")
      ("subject" "quad")
     )
    )
    ("subject" "galaxy.s.duo" r)
  )
  1000)

 ((& 
   (|
    ("xref" "flyer.*mileage" r)
    ("xref" "travel"         s))
   (|
    ("subject" "\\<ams\\>" r)
    ("subject" "\\<lax\\>" r)
    ("subject" "\\<lgw\\>" r)
    ("subject" "\\<lhr\\>" r)
    ("subject" "\\<ord\\>" r)
    ("subject" "\\<sjc\\>" r)
  )
  1000)
)

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

end of thread, other threads:[~2012-10-09  9:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-29 17:33 simple "advanced" score file is apparently ignored (and Gnus Fritz Wuehler
2012-09-29 20:22 ` Adam Sjøgren
     [not found] ` <mailman.9989.1348950156.855.info-gnus-english@gnu.org>
2012-10-09  9:15   ` Anonymous

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