From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/7558 Path: main.gmane.org!not-for-mail From: Sudish Joseph Newsgroups: gmane.emacs.gnus.general Subject: Re: score files... Date: 12 Aug 1996 00:17:50 -0400 Sender: sj@mindspring.com Message-ID: References: <199608102309.TAA02898@justine.elastica.com> <199608111553.LAA00837@justine.elastica.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.69) Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1035147854 7623 80.91.224.250 (20 Oct 2002 21:04:14 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 21:04:14 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by deanna.miranova.com (8.7.5/8.6.9) with SMTP id VAA03342 for ; Sun, 11 Aug 1996 21:30:04 -0700 Original-Received: from atreides.erehwon.org (sj@user-168-121-167-78.dialup.mindspring.com [168.121.167.78]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Mon, 12 Aug 1996 06:13:48 +0200 Original-Received: (from sj@localhost) by atreides.erehwon.org (8.7.5/8.7.3) id AAA00218; Mon, 12 Aug 1996 00:17:50 -0400 Original-To: ding@ifi.uio.no In-Reply-To: Jack Vinson's message of 11 Aug 1996 18:16:06 -0400 Original-Lines: 67 X-Mailer: Red Gnus v0.10/XEmacs 19.14 Xref: main.gmane.org gmane.emacs.gnus.general:7558 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:7558 In article , Jack Vinson writes: >>>>>> writes: >> Actually on further review it looks like comp.lang.java.SCORE matches the >> entire hierarchy. > Isn't this incorrect? group.SCORE should only match the group in question, > should it not? group.all.SCORE will match group and any hierarchy under > group. This is what you wanted, I think. >>From what I recall, the match isn't anchored and you'll get a hit on a substring. So, emacs.SCORE would match any of gnus.emacs.gnus, comp.emacs.xemacs and alt.religion.emacs. Hmm, this might have changed. Lars? > This may be related to something I noticed a while back when grokking > through various 'forsale' groups. There is a forsale.stuff hierarchy and > various other foo.bar.forsale groups. I thought I was going to need > forsale.all.SCORE to match the first groups and all.forsale.SCORE to match > the second groups. It turns out that the former form matches both sets of > groups. Is this the correct behavior as well? Sure, if the match isn't anchored. Being able to separate the name of the score file from the criterion used to select the score file is useful in itself...this is why I added gnus-score-file-{single|multiple}-match-alist. I guess no one uses it because the only notification was a Changelog entry somewhere in the ding.x series. The match is a regexp and you may match any part of the group name using any regexp you like. Using the `files' directive isn't quite so flexible, since you still need to ensure that the file containing the directive gets loaded. You can play funky tricks by making the filename a regexp as Lars pointed out recently. So, if you wanted a score file for the news.* heirarchy, you might use "^news.SCORE" as the name of the file name. I prefer adding ("^news" "News.score") to the -match-alists. The main problem with all this is that you still need to ensure that score entries go into the right file. For e.g., I'd like all scoring I do in any group on emacs to go into Emacs.SCORE, irrespective of where the word emacs occurs in the groupname. This is difficult (but !impossible :-) to do without providing a mapping from group to filename. If you use the -match-alist's, you get the mapping for free, using the hook I posted earlier. Here it is again, since I find it so useful. (add-hook 'gnus-summary-prepare-hook (defun sj/gnus-score-select-score-file () "Set score file for group based upon gnus-score-file-single-match-alist. The first score file in the first matching entry is used." (let ((score-file (some #'(lambda (r) (if (string-match (car r) gnus-newsgroup-name) (cadr r))) gnus-score-file-single-match-alist))) (if (stringp score-file) (gnus-score-change-score-file score-file))))) Using this in conjunction with maintaining per-group score file selection in gnus-score-file-single-match-alist keeps things simple and intuitive, IMO. -Sudish