From 0a1c83457d209fcf08c741a5e50bd60b72fd8713 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Wed, 18 Feb 2015 22:25:22 +0000 Subject: [PATCH] Handle unquoted IMAP group names * lisp/gnus/nnimap.el (nnimap-get-groups): Correctly read unquoted group names from the server LIST response. --- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/nnimap.el | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 7910d74fb1..7895f378b8 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2015-02-18 Eric Abrahamsen + + * nnimap.el (nnimap-get-groups): Correctly read unquoted group names + from the server LIST response. + 2015-02-14 Lars Ingebrigtsen * nnimap.el (nnimap-retrieve-headers): If the server closes connection diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 4a9ca744b9..6904e0a725 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1262,7 +1262,12 @@ If LIMIT, first try to limit the search to the N last articles." (while (search-forward "* LIST " nil t) (let ((flags (read (current-buffer))) (separator (read (current-buffer))) - (group (read (current-buffer)))) + (group (buffer-substring-no-properties + (progn (skip-chars-forward " \"") + (point)) + (progn (move-end-of-line 1) + (skip-chars-backward " \"") + (point))))) (unless (member '%NoSelect flags) (push (utf7-decode (if (stringp group) group -- 2.39.2