From 579d49fa6ef7eb66fb6a042251f95d2fa94d2e3b Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 31 Jan 2014 08:33:13 +0000 Subject: [PATCH] lisp/gnus/nnimap.el (nnimap-transform-headers): Fix Davmail header parsing --- lisp/gnus/ChangeLog | 4 ++++ lisp/gnus/nnimap.el | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) 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 ".") -- 2.39.2