Gnus development mailing list
 help / color / mirror / Atom feed
From: Dmitry Bely <dbely@mail.ru>
Cc: xemacs-nt@xemacs.org
Subject: Gnus patch: now scoring should work on NT
Date: 16 Jul 2000 16:03:26 +0400	[thread overview]
Message-ID: <7lamjn8x.fsf@mail.ru> (raw)

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

                 reply	other threads:[~2000-07-16 12:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7lamjn8x.fsf@mail.ru \
    --to=dbely@mail.ru \
    --cc=xemacs-nt@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).