Gnus development mailing list
 help / color / mirror / Atom feed
* Default SCORE file for a hierarchy
@ 1998-07-08 14:12 Hallvard B Furuseth
  1998-07-12  2:03 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Hallvard B Furuseth @ 1998-07-08 14:12 UTC (permalink / raw)


Usually I don't want `gnus-summary-increase-score' & co to create new
score files, I want them update the "innermost" *existing* score file
for the newsgroup I'm reading.

For example, I have
	comp.lang.SCORE
	comp.lang.perl.SCORE
Now, `I' in comp.lang.perl.misc should score to comp.lang.perl.SCORE,
and  `I' in comp.lang.sather    should score to comp.lang.SCORE.
To make `I' in comp.lang.eiffel create a new score file for eiffel
alone, I could for example do `gnus-score-change-score-file' first.

My gnus-score-find-score-files-function = 'gnus-score-find-hierarchical.

Any way to do this?  Can i put something in comp.lang.SCORE and
comp.lang.perl.SCORE, for example?

-- 
Hallvard


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

* Re: Default SCORE file for a hierarchy
  1998-07-08 14:12 Default SCORE file for a hierarchy Hallvard B Furuseth
@ 1998-07-12  2:03 ` Lars Magne Ingebrigtsen
  1998-07-13 21:17   ` Hallvard B Furuseth
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-07-12  2:03 UTC (permalink / raw)


Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:

> Usually I don't want `gnus-summary-increase-score' & co to create new
> score files, I want them update the "innermost" *existing* score file
> for the newsgroup I'm reading.
> 
> For example, I have
> 	comp.lang.SCORE
> 	comp.lang.perl.SCORE
> Now, `I' in comp.lang.perl.misc should score to comp.lang.perl.SCORE,
> and  `I' in comp.lang.sather    should score to comp.lang.SCORE.
> To make `I' in comp.lang.eiffel create a new score file for eiffel
> alone, I could for example do `gnus-score-change-score-file' first.
> 
> My gnus-score-find-score-files-function = 'gnus-score-find-hierarchical.
> 
> Any way to do this?  Can i put something in comp.lang.SCORE and
> comp.lang.perl.SCORE, for example?

I don't quite recally, but I use this:

(setq gnus-home-score-file 'gnus-hierarchial-home-score-file)

However, perhaps there should be a home-score-file function that just
returns the "innermost" score file used?

I've added the `gnus-current-home-score-file' to Gnus 5.6.25.

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


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

* Re: Default SCORE file for a hierarchy
  1998-07-12  2:03 ` Lars Magne Ingebrigtsen
@ 1998-07-13 21:17   ` Hallvard B Furuseth
  1998-07-15  7:40     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Hallvard B Furuseth @ 1998-07-13 21:17 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> (setq gnus-home-score-file 'gnus-hierarchial-home-score-file)

Duh.  That variable has its own node, yet I hadn't noticed it:-(
So, I tried to put this in comp.lang.SCORE, that' exactly what I want:

(...
 (local (gnus-home-score-file "...GNUS/comp.lang.SCORE")))

...except it doesn't work.  `M-: gnus-home-score-file' from *Summary
comp.lang.sather* does say ...comp.lang.SCORE as expected, but `L' and
`V e' update comp.lang.sather.SCORE.

> However, perhaps there should be a home-score-file function that just
> returns the "innermost" score file used?

Not for me.  I do want new score files to be created unless I've
explicitly marked a "hierachy score file" to receive the scores.



BTW, maybe (gnus)Score Variables should have references to the nodes
that describe the score variables it does not currently mention.
Here is the list (from apropos gnus.*scor):

gnus-decay-score-function
gnus-decay-scores
gnus-default-adaptive-score-alist
gnus-default-adaptive-word-score-alist
gnus-global-score-files
gnus-home-score-file
gnus-low-score-mark
gnus-newsgroup-scored
gnus-orphan-score
gnus-score-alist
gnus-score-decay-constant
gnus-score-decay-scale
gnus-score-default-duration
gnus-score-default-fold
gnus-score-default-header
gnus-score-default-type
gnus-score-edit-exit-function
gnus-score-exact-adapt-limit
gnus-score-file-multiple-match-alist
gnus-score-file-single-match-alist
gnus-score-menu
gnus-score-menu-hook
gnus-score-mimic-keymap
gnus-score-mode-hook
gnus-thread-score-function
gnus-use-adaptive-scoring

-- 
Hallvard


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

* Re: Default SCORE file for a hierarchy
  1998-07-13 21:17   ` Hallvard B Furuseth
@ 1998-07-15  7:40     ` Lars Magne Ingebrigtsen
  1998-07-15 14:53       ` Hallvard B Furuseth
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-07-15  7:40 UTC (permalink / raw)


Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:

> Duh.  That variable has its own node, yet I hadn't noticed it:-(
> So, I tried to put this in comp.lang.SCORE, that' exactly what I want:
> 
> (...
>  (local (gnus-home-score-file "...GNUS/comp.lang.SCORE")))
> 
> ...except it doesn't work.  `M-: gnus-home-score-file' from *Summary
> comp.lang.sather* does say ...comp.lang.SCORE as expected, but `L' and
> `V e' update comp.lang.sather.SCORE.

The home score file has to be computed before the other score files
have been loaded, so this won't work.  So I'd suggest setting
gnus-home-score-file to a function that triggers on comp.lang groups,
and returns nil on other groups.

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


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

* Re: Default SCORE file for a hierarchy
  1998-07-15  7:40     ` Lars Magne Ingebrigtsen
@ 1998-07-15 14:53       ` Hallvard B Furuseth
  1998-07-18 19:42         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Hallvard B Furuseth @ 1998-07-15 14:53 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
>Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:
>> So, I tried to put this in comp.lang.SCORE, that' exactly what I want:
>> 
>> (...
>>  (local (gnus-home-score-file "...GNUS/comp.lang.SCORE")))

No, it isn't.  If it worked, that would override comp.lang.c.SCORE,
which does exist.

> I'd suggest setting gnus-home-score-file to a function that triggers
> on comp.lang groups, and returns nil on other groups.

Same problem there.

> The home score file has to be computed before the other score files
> have been loaded, so this won't work.

Drat.

Well, since it's possible to say `M-x gnus-score-change-score-file'
after scoring, I assume it would be possible to put that in a hook
somewhere too.  After summary generation, or something.

Would this work?  Is it worth it?
 1. Before loading a group's score files,
      set `my-score-file' to nil.
 2. When loading a score file,
      set `my-score-file' to that score file *if it exists (or is cached)*.
 3. After loading the files (or after summary generation or something),
      do (if my-score-file
	   (gnus-score-change-score-file my-score-file)).
The actions above would be done via some hooks, of course.

That should always set the score file to the innermost file, since the
innermost file is loaded last.  (Or do I mean the outermost file?  The
score file with the longest name, anyway.)

BTW, #2 above could be replaced with something like
	(eval (setq my-score-file current-score-file))
in every score file, and some hook to autoinsert that in newly created
score files -- maybe find-file-hooks or a score-mode-hook.

-- 
Hallvard


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

* Re: Default SCORE file for a hierarchy
  1998-07-15 14:53       ` Hallvard B Furuseth
@ 1998-07-18 19:42         ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-07-18 19:42 UTC (permalink / raw)


Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:

> Well, since it's possible to say `M-x gnus-score-change-score-file'
> after scoring, I assume it would be possible to put that in a hook
> somewhere too.  After summary generation, or something.
> 
> Would this work?

Yes.

> Is it worth it?

Well...

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


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

end of thread, other threads:[~1998-07-18 19:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-08 14:12 Default SCORE file for a hierarchy Hallvard B Furuseth
1998-07-12  2:03 ` Lars Magne Ingebrigtsen
1998-07-13 21:17   ` Hallvard B Furuseth
1998-07-15  7:40     ` Lars Magne Ingebrigtsen
1998-07-15 14:53       ` Hallvard B Furuseth
1998-07-18 19:42         ` 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).