lisp/gnus/nnimap.el (nnimap-transform-headers): Fix Davmail header parsing

This commit is contained in:
Lars Ingebrigtsen 2014-01-31 08:33:13 +00:00 committed by Katsumi Yamaoka
parent a69ecd19fe
commit 579d49fa6e
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2014-01-31 Lars Ingebrigtsen <larsi@gnus.org>
* nnimap.el (nnimap-transform-headers): Fix Davmail header parsing.
2014-01-31 Dave Abrahams <dave@boostpro.com>
* gnus-salt.el (gnus-tree-highlight-article): Don't move point around

View file

@ -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 ".")