From: Lars Magne Ingebrigtsen Date: Mon, 11 Oct 2010 18:30:46 +0000 (+0200) Subject: Not all articles have bodies. Protect against this. X-Git-Url: http://cgit.sxemacs.org/?p=gnus;a=commitdiff_plain;h=a38f7f0769b418bce7538a763e13444bd1efe8cb Not all articles have bodies. Protect against this. Reported by Michael Welsh Duggan. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8aeff4488..f798f0889 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-10-11 Lars Magne Ingebrigtsen + * nnimap.el (nnimap-transform-split-mail): Not all articles have + bodies. Protect against this. Reported by Michael Welsh Duggan. + * shr.el (shr-current-column): New function. (shr-find-fill-point): New function. diff --git a/lisp/nnimap.el b/lisp/nnimap.el index 73b7fbdb7..68bd6307e 100644 --- a/lisp/nnimap.el +++ b/lisp/nnimap.el @@ -1627,8 +1627,10 @@ textual parts.") (forward-char (1+ bytes)) (setq bytes (nnimap-get-length)) (delete-region (line-beginning-position) (line-end-position)) - (forward-char (1+ bytes)) - (delete-region (line-beginning-position) (line-end-position)))))) + ;; There's a body; skip past that. + (when bytes + (forward-char (1+ bytes)) + (delete-region (line-beginning-position) (line-end-position))))))) (defun nnimap-dummy-active-number (group &optional server) 1)