Handle unquoted IMAP group names
authorEric (clem) <eric@ericabrahamsen.net>
Sat, 14 Feb 2015 10:39:10 +0000 (18:39 +0800)
committerEric (clem) <eric@ericabrahamsen.net>
Mon, 16 Feb 2015 09:17:52 +0000 (17:17 +0800)
* lisp/nnimap.el (nnimap-get-groups): Correctly read unquoted group
  names from the server LIST response.

lisp/nnimap.el

index 4a9ca74..6904e0a 100644 (file)
@@ -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 " \r\"")
+                          (point)))))
        (unless (member '%NoSelect flags)
          (push (utf7-decode (if (stringp group)
                                 group