]> git.eshelyaron.com Git - emacs.git/commitdiff
Encode names of nnml groups that nnmail-get-new-mail creates in active file.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 30 Jul 2010 02:01:04 +0000 (02:01 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Fri, 30 Jul 2010 02:01:04 +0000 (02:01 +0000)
2010-07-30  Katsumi Yamaoka  <yamaoka@jpl.org>
 * nnmail.el (nnmail-get-new-mail-1): Encode group names possibly
 containing non-ASCII characters in active file for nnml back end.

lisp/gnus/ChangeLog
lisp/gnus/nnmail.el

index e2af8fcdd16ae5a12aaf0d1d0da348faea5add74..44c28c52fff0b1f5568691ecdad2a566bede8388 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-30  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nnmail.el (nnmail-get-new-mail-1): Encode group names possibly
+       containing non-ASCII characters in active file for nnml back end.
+
 2010-07-24  David Engster  <dengste@eml.cc>
 
        * mml-smime.el (mml-smime-epg-verify): Also accept the older
index 8bf0cbf5de10fc0aebd2dca0d9efb593d6671215..537d98cc6aeb052930611cc263ecc2d98038b9b2 100644 (file)
@@ -1844,9 +1844,20 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
       (if (zerop total)
          (nnheader-message 4 "%s: Reading incoming mail (no new mail)...done"
                            method (car source))
-       (nnmail-save-active
-        (nnmail-get-value "%s-group-alist" method)
-        (nnmail-get-value "%s-active-file" method))
+       (let ((group-alist (nnmail-get-value "%s-group-alist" method))
+             (active-file (nnmail-get-value "%s-active-file" method))
+             encoded)
+         ;; Encode group names possibly containing non-ASCII characters.
+         (cond ((eq method 'nnml)
+                (nnmail-save-active
+                 (dolist (elem group-alist (nreverse encoded))
+                   (push (cons (nnml-encoded-group-name (car elem)
+                                                        gnus-command-method)
+                               (cdr elem))
+                         encoded))
+                 active-file))
+               (t
+                (nnmail-save-active group-alist active-file))))
        (when exit-func
          (funcall exit-func))
        (run-hooks 'nnmail-read-incoming-hook)