From: Lars Ingebrigtsen Date: Fri, 31 Jan 2014 08:33:13 +0000 (+0000) Subject: lisp/gnus/nnimap.el (nnimap-transform-headers): Fix Davmail header parsing X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~216 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=579d49fa6ef7eb66fb6a042251f95d2fa94d2e3b;p=emacs.git lisp/gnus/nnimap.el (nnimap-transform-headers): Fix Davmail header parsing --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index b30afa601e6..29d47ab4226 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2014-01-31 Lars Ingebrigtsen + + * nnimap.el (nnimap-transform-headers): Fix Davmail header parsing. + 2014-01-31 Dave Abrahams * gnus-salt.el (gnus-tree-highlight-article): Don't move point around diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 016a8a26062..cbaea91f5ab 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -216,7 +216,7 @@ textual parts.") ;; 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) + (re-search-forward "\\* [0-9]+ \\(UID \\)? FETCH" nil t) (point-max))) t) (setq size (string-to-number (match-string 1))) @@ -255,7 +255,9 @@ textual parts.") (insert (format "Chars: %s\n" size))) (when lines (insert (format "Lines: %s\n" lines))) - (unless (re-search-forward "^\r$" nil t) + ;; Most servers have a blank line after the headers, but + ;; Davmail doesn't. + (unless (re-search-forward "^\r$\\|^)\r?$" nil t) (goto-char (point-max))) (delete-region (line-beginning-position) (line-end-position)) (insert ".")