(nnimap-transform-headers): Don't bug out on bodiless articles.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 24 Oct 2010 17:33:04 +0000 (19:33 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Sun, 24 Oct 2010 17:33:04 +0000 (19:33 +0200)
lisp/ChangeLog
lisp/nnimap.el

index 0404a06..c6d07ec 100644 (file)
@@ -3,6 +3,7 @@
        * nnimap.el (nnimap-request-head): New function.
        (nnimap-request-move-article): Try to be slighly faster by not
        requesting the entire message when moving.
+       (nnimap-transform-headers): Don't bug out on bodiless articles.
 
 2010-10-24  Julien Danjou  <julien@danjou.info>
 
index d7dc1fb..9013206 100644 (file)
@@ -203,7 +203,8 @@ textual parts.")
          (insert (format "Chars: %s\n" size)))
        (when lines
          (insert (format "Lines: %s\n" lines)))
-       (re-search-forward "^\r$")
+       (unless (re-search-forward "^\r$" nil t)
+         (goto-char (point-max)))
        (delete-region (line-beginning-position) (line-end-position))
        (insert ".")
        (forward-line 1)))))