From e2805bf51a5c8cb8c2dc991d0a09931a2538b965 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Mon, 12 Nov 2007 12:10:01 +0000 Subject: [PATCH] * nnmail.el (nnmail-parse-active): Make group names unibyte. (nnmail-save-active): Use a unibyte buffer saving active file, which may contain non-ASCII group names. * nnml.el (nnml-request-group): Decode group names in messages. --- lisp/ChangeLog | 8 ++++++++ lisp/nnmail.el | 3 ++- lisp/nnml.el | 9 +++++---- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index adee30892..c7bbca53d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2007-11-12 Katsumi Yamaoka + + * nnmail.el (nnmail-parse-active): Make group names unibyte. + (nnmail-save-active): Use a unibyte buffer saving active file, which + may contain non-ASCII group names. + + * nnml.el (nnml-request-group): Decode group names in messages. + 2007-11-05 Reiner Steib * message.el (message-citation-line-function) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 7608660f0..8ff6d1d14 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -693,7 +693,7 @@ nn*-request-list should have been called before calling this function." (setq group (symbol-name group))) (if (and (numberp (setq max (read buffer))) (numberp (setq min (read buffer)))) - (push (list group (cons min max)) + (push (list (mm-string-as-unibyte group) (cons min max)) group-assoc))) (error nil)) (widen) @@ -708,6 +708,7 @@ nn*-request-list should have been called before calling this function." (let ((coding-system-for-write nnmail-active-file-coding-system)) (when file-name (with-temp-file file-name + (mm-disable-multibyte) (nnmail-generate-active group-assoc))))) (defun nnmail-generate-active (alist) diff --git a/lisp/nnml.el b/lisp/nnml.el index 0f1591810..f644fb7b2 100644 --- a/lisp/nnml.el +++ b/lisp/nnml.el @@ -258,7 +258,8 @@ non-nil.") (string-to-number (file-name-nondirectory path))))))) (deffoo nnml-request-group (group &optional server dont-check) - (let ((file-name-coding-system nnmail-pathname-coding-system)) + (let ((file-name-coding-system nnmail-pathname-coding-system) + (decoded (nnml-decoded-group-name group server))) (cond ((not (nnml-possibly-change-directory group server)) (nnheader-report 'nnml "Invalid group (no such directory)")) @@ -268,15 +269,15 @@ non-nil.") ((not (file-directory-p nnml-current-directory)) (nnheader-report 'nnml "%s is not a directory" nnml-current-directory)) (dont-check - (nnheader-report 'nnml "Group %s selected" group) + (nnheader-report 'nnml "Group %s selected" decoded) t) (t (nnheader-re-read-dir nnml-current-directory) (nnmail-activate 'nnml) (let ((active (nth 1 (assoc group nnml-group-alist)))) (if (not active) - (nnheader-report 'nnml "No such group: %s" group) - (nnheader-report 'nnml "Selected group %s" group) + (nnheader-report 'nnml "No such group: %s" decoded) + (nnheader-report 'nnml "Selected group %s" decoded) (nnheader-insert "211 %d %d %d %s\n" (max (1+ (- (cdr active) (car active))) 0) (car active) (cdr active) group))))))) -- 2.34.1