From: Lars Ingebrigtsen Date: Mon, 20 Feb 2012 11:17:07 +0000 (+0000) Subject: nnimap.el (nnimap-request-list): Return the group names encoded as utf8. Otherwise... X-Git-Tag: emacs-pretest-24.0.94~96 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=75a4d9cc2f182761e2be64a429ed617557811194;p=emacs.git nnimap.el (nnimap-request-list): Return the group names encoded as utf8. Otherwise non-European group names don't work. (nnimap-request-newgroups): Ditto. gnus-sum.el (gnus-summary-insert-old-articles): Fix the syntax for the default in `read-string' (bug#10757). --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index eee886ec1c2..e2d99e92c9e 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,5 +1,12 @@ 2012-02-20 Lars Ingebrigtsen + * nnimap.el (nnimap-request-list): Return the group names encoded as + utf8. Otherwise non-European group names don't work. + (nnimap-request-newgroups): Ditto. + + * gnus-sum.el (gnus-summary-insert-old-articles): Fix the syntax for + the default in `read-string' (bug#10757). + * gnus-msg.el (gnus-group-post-news): Don't bug out on `C-u a' on topics (bug#10843). diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 8ae8d0b8ae2..9770b8f9982 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -12860,9 +12860,8 @@ If ALL is a number, fetch this number of articles." (if initial "max" "default") len) nil nil - (if initial - (cons (number-to-string initial) - 0))))) + (and initial + (number-to-string initial))))) (unless (string-match "^[ \t]*$" input) (setq all (string-to-number input)) (if (< all len) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 6cbd83c8f78..f978b8c9906 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1191,7 +1191,8 @@ textual parts.") (dolist (response responses) (let* ((sequence (car response)) (response (cadr response)) - (group (cadr (assoc sequence sequences)))) + (group (cadr (assoc sequence sequences))) + (egroup (encode-coding-string group 'utf-8))) (when (and group (equal (caar response) "OK")) (let ((uidnext (nnimap-find-parameter "UIDNEXT" response)) @@ -1203,15 +1204,14 @@ textual parts.") (setq highest (1- (string-to-number (car uidnext))))) (cond ((null highest) - (insert (format "%S 0 1 y\n" (utf7-decode group t)))) + (insert (format "%S 0 1 y\n" egroup))) ((zerop exists) ;; Empty group. - (insert (format "%S %d %d y\n" - (utf7-decode group t) + (insert (format "%S %d %d y\n" egroup highest (1+ highest)))) (t ;; Return the widest possible range. - (insert (format "%S %d 1 y\n" (utf7-decode group t) + (insert (format "%S %d 1 y\n" egroup (or highest exists))))))))) t))))) @@ -1223,7 +1223,7 @@ textual parts.") (nnimap-get-groups))) (unless (assoc group nnimap-current-infos) ;; Insert dummy numbers here -- they don't matter. - (insert (format "%S 0 1 y\n" (utf7-encode group))))) + (insert (format "%S 0 1 y\n" (encode-coding-string group 'utf-8))))) t))) (deffoo nnimap-retrieve-group-data-early (server infos)