Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-agent : .overview and .agentview file coding system.
@ 1998-09-14  6:20 Tatsuya Ichikawa
  0 siblings, 0 replies; only message in thread
From: Tatsuya Ichikawa @ 1998-09-14  6:20 UTC (permalink / raw)


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


  Hi.
  Sorry for my poooor english.

  gnus-agent writes .overview and .agentview follows
  file-coding-system-alist.

  On Win32 environment , .overview and .agentview write in sjis-dos.
  Perhaps , gnus occurs error when reading .overview and .agentview.

  So, following patch may require on Multilingual environment.

  Thanks.


[-- Attachment #2: gnus-agent.el.diff --]
[-- Type: application/octet-stream, Size: 3997 bytes --]

--- gnus-agent.el.orig	Mon Sep 14 14:59:26 1998
+++ gnus-agent.el	Mon Sep 14 15:06:08 1998
@@ -92,7 +92,7 @@
 (defvar gnus-agent-spam-hashtb nil)
 (defvar gnus-agent-file-name nil)
 (defvar gnus-agent-send-mail-function nil)
-(defvar gnus-agent-article-file-coding-system 'no-conversion)
+(defvar gnus-agent-file-coding-system 'no-conversion)
 
 (defconst gnus-agent-scoreable-headers
   (list
@@ -524,7 +524,7 @@
     (let* ((gnus-command-method method)
 	   (file (gnus-agent-lib-file "active")))
       (gnus-make-directory (file-name-directory file))
-      (let ((coding-system-for-write gnus-agent-article-file-coding-system))
+      (let ((coding-system-for-write gnus-agent-file-coding-system))
 	(write-region (point-min) (point-max) file nil 'silent))
       (when (file-exists-p (gnus-agent-lib-file "groups"))
 	(delete-file (gnus-agent-lib-file "groups"))))))
@@ -533,9 +533,10 @@
   (let* ((gnus-command-method method)
 	 (file (gnus-agent-lib-file "groups")))
     (gnus-make-directory (file-name-directory file))
-    (write-region (point-min) (point-max) file nil 'silent))
+    (let ((coding-system-for-write gnus-agent-file-coding-system))
+      (write-region (point-min) (point-max) file nil 'silent))
     (when (file-exists-p (gnus-agent-lib-file "active"))
-      (delete-file (gnus-agent-lib-file "active"))))
+      (delete-file (gnus-agent-lib-file "active")))))
 
 (defun gnus-agent-save-group-info (method group active)
   (when (gnus-agent-method-p method)
@@ -604,8 +605,9 @@
   (save-excursion
     (set-buffer gnus-agent-current-history)
     (gnus-make-directory (file-name-directory gnus-agent-file-name))
-    (write-region (1+ (point-min)) (point-max)
-		  gnus-agent-file-name nil 'silent)))
+    (let ((coding-system-for-write gnus-agent-file-coding-system))
+      (write-region (1+ (point-min)) (point-max)
+		    gnus-agent-file-name nil 'silent))))
 
 (defun gnus-agent-close-history ()
   (when (gnus-buffer-live-p gnus-agent-current-history)
@@ -703,7 +705,7 @@
 		(setq id "No-Message-ID-in-article")
 	      (setq id (buffer-substring (match-beginning 1) (match-end 1))))
 	    (let ((coding-system-for-write
-		   gnus-agent-article-file-coding-system))
+		   gnus-agent-file-coding-system))
 	      (write-region (point-min) (point-max)
 			    (concat dir (number-to-string (caar pos)))
 			    nil 'silent))
@@ -746,10 +748,12 @@
   (save-excursion
     (while gnus-agent-buffer-alist
       (set-buffer (cdar gnus-agent-buffer-alist))
-      (write-region (point-min) (point-max)
-		    (gnus-agent-article-name ".overview"
-					     (caar gnus-agent-buffer-alist))
-		     nil 'silent)
+      (let ((coding-system-for-write
+	     gnus-agent-file-coding-system))
+	(write-region (point-min) (point-max)
+		      (gnus-agent-article-name ".overview"
+					       (caar gnus-agent-buffer-alist))
+		      nil 'silent))
       (pop gnus-agent-buffer-alist))
     (while gnus-agent-group-alist
       (with-temp-file (caar gnus-agent-group-alist)
@@ -780,7 +784,9 @@
  	    (gnus-agent-braid-nov group articles file))
  	  (gnus-make-directory (nnheader-translate-file-chars
  				(file-name-directory file)))
- 	  (write-region (point-min) (point-max) file nil 'silent)
+	  (let ((coding-system-for-write
+		 gnus-agent-file-coding-system))
+	    (write-region (point-min) (point-max) file nil 'silent))
  	  (gnus-agent-save-alist group articles nil)
  	  (gnus-agent-enter-history
  	   "last-header-fetched-for-session"
@@ -1386,7 +1392,9 @@
 		 ;; Schedule the history line for nuking.
 		 (push (cdr elem) histories)))
 	     (gnus-make-directory (file-name-directory nov-file))
-	     (write-region (point-min) (point-max) nov-file nil 'silent)
+	     (let ((coding-system-for-write
+		    gnus-agent-file-coding-system))
+	       (write-region (point-min) (point-max) nov-file nil 'silent))
 	     ;; Delete the unwanted entries in the alist.
 	     (setq gnus-agent-article-alist
 		   (sort gnus-agent-article-alist 'car-less-than-car))

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


-- 
  Tatsuya Ichikawa <ichikawa@hv.epson.co.jp>
  # PGP Public Key : See X-Info header in this message.

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

only message in thread, other threads:[~1998-09-14  6:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-14  6:20 gnus-agent : .overview and .agentview file coding system Tatsuya Ichikawa

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