From: Lars Ingebrigtsen Date: Mon, 13 Feb 2012 22:18:33 +0000 (+0000) Subject: nnimap.el (nnimap-transform-headers): Don't bug out on header lines containing stuff... X-Git-Tag: emacs-pretest-24.0.94~146 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=20d6487ebbe0f04072c741e29f06d0132e282ff9;p=emacs.git nnimap.el (nnimap-transform-headers): Don't bug out on header lines containing stuff that look like IMAP length encodings. --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 69598ad9f45..99554cd9ffe 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -3,6 +3,8 @@ * nnimap.el (nnimap-record-commands): New variable. (nnimap-log-command): Use it. (nnimap-make-process-buffer): Add a space to the process buffer. + (nnimap-transform-headers): Don't bug out on header lines containing + stuff that look like IMAP length encodings. * shr.el (shr-rescale-image): Allow viewing large images. @@ -85,7 +87,7 @@ have newlines within the strings, and where the UID comes after the BODYSTRUCTURE element (bug#10537). - * shr-color.el (shr-color-set-minimum-interval): Renamed to add prefix + * shr-color.el (shr-color-set-minimum-interval): Rename to add prefix (bug#10732). * shr.el (shr-insert-document): Add doc string. diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 2cdb170315f..c6f0f7a97e8 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -201,7 +201,10 @@ textual parts.") (while (re-search-forward "[^]][ (]{\\([0-9]+\\)}\r?\n" (save-excursion - (or (re-search-forward "\\* [0-9]+ FETCH" nil t) + ;; Start of the header section. + (or (re-search-forward "] {[0-9]+}\r?\n" nil t) + ;; Start of the next FETCH. + (re-search-forward "\\* [0-9]+ FETCH" nil t) (point-max))) t) (setq size (string-to-number (match-string 1)))