From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/31803 Path: main.gmane.org!not-for-mail From: Dmitry Bely Newsgroups: gmane.emacs.gnus.general Subject: Gnus patch: now scoring should work on NT Date: 16 Jul 2000 16:03:26 +0400 Organization: DB @ home Sender: owner-ding@hpc.uh.edu Message-ID: <7lamjn8x.fsf@mail.ru> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035168171 16120 80.91.224.250 (21 Oct 2002 02:42:51 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 02:42:51 +0000 (UTC) Cc: xemacs-nt@xemacs.org Return-Path: Original-Received: from fisher.math.uh.edu (fisher.math.uh.edu [129.7.128.35]) by mailhost.sclp.com (Postfix) with ESMTP id F38ACD051E for ; Sun, 16 Jul 2000 10:07:40 -0400 (EDT) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by fisher.math.uh.edu (8.9.1/8.9.1) with ESMTP id JAC17914; Sun, 16 Jul 2000 09:07:30 -0500 (CDT) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sun, 16 Jul 2000 09:05:25 -0500 (CDT) Original-Received: from mailhost.sclp.com (postfix@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id JAA18476 for ; Sun, 16 Jul 2000 09:05:10 -0500 (CDT) Original-Received: from relay.rinet.ru (relay.rinet.ru [195.54.192.35]) by mailhost.sclp.com (Postfix) with ESMTP id B1B60D051E for ; Sun, 16 Jul 2000 10:05:44 -0400 (EDT) Original-Received: (from uucp@localhost) by relay.rinet.ru (8.9.3/8.9.3) with UUCP id SAA16275; Sun, 16 Jul 2000 18:05:15 +0400 (MSD) X-Envelope-To: ding@gnus.org Original-Received: from dialin.stormoff (DIMA) [192.168.0.128] by stormoff with smtp (Exim 2.05 #1 (Debian)) id 13Dovk-0002ln-00; Sun, 16 Jul 2000 17:58:04 +0400 Original-To: ding@gnus.org User-Agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Big Bend) Original-Lines: 9 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:31803 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:31803 --=-=-= After some debugging I have found why it did not work before (incorrect SCORE file name splitting/translation). The patch against Gnus 5.8.7 is attached. --=-=-= Content-Type: application/octet-stream Content-Disposition: attachment; filename=nt-scoring --- nnheader.el.orig Sat Jul 1 15:10:52 2000 +++ nnheader.el Wed Jul 12 15:16:03 2000 @@ -626,10 +626,24 @@ 2 0)) ;; We translate -- but only the file name. We leave the directory ;; alone. - (if (string-match "/[^/]+\\'" file) - ;; This is needed on NT's and stuff. - (setq leaf (substring file (1+ (match-beginning 0))) - path (substring file 0 (1+ (match-beginning 0)))) + (if (memq system-type '(win32 w32 mswindows windows-nt)) + ;; This is needed on NT and stuff, because + ;; file-name-nondirectory is not enough to split + ;; file names, containing ':', e.g. + ;; "d:\\Work\\News\\nntp+news.fido7.ru:fido7.ru.gnu.SCORE" + ;; + ;; we are trying to correctly split such names: + ;; "d:file.name" -> "a:" "file.name" + ;; "aaa:bbb.ccc" -> "" "aaa:bbb.ccc" + ;; "d:aaa\\bbb:ccc" -> "d:aaa\\" "bbb:ccc" + ;; etc. + ;; to translate then only the file name part. + (progn + (setq leaf file + path "") + (if (string-match "\\(^\\w:\\|[/\\]\\)\\([^/\\]+\\)$" file) + (setq leaf (substring file (match-beginning 2)) + path (substring file 0 (match-beginning 2))))) ;; Fall back on this. (setq leaf (file-name-nondirectory file) path (file-name-directory file)))) --=-=-= Hope to hear from you soon, Dmitry --=-=-=--