Gnus development mailing list
 help / color / mirror / Atom feed
* Gnus patch: now scoring should work on NT
@ 2000-07-16 12:03 Dmitry Bely
  0 siblings, 0 replies; only message in thread
From: Dmitry Bely @ 2000-07-16 12:03 UTC (permalink / raw)
  Cc: xemacs-nt

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

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.


[-- Attachment #2: nt-scoring --]
[-- Type: application/octet-stream, Size: 1271 bytes --]

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

[-- Attachment #3: Type: text/plain, Size: 36 bytes --]


Hope to hear from you soon,
Dmitry

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-07-16 12:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-16 12:03 Gnus patch: now scoring should work on NT Dmitry Bely

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